且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使php图像链接在新窗口中打开

更新时间:2023-11-21 08:15:34

要在新窗口中打开,您必须将目标添加到您的标签,例如:

To open in a new window, you have to add target to your a tag, eg:

<a href="http://example.com" target="_blank">Example Link</a>

要配置它打开的大小,afaik你必须使用javascript,

To configure the size it's opened at, afaik you'd have to use javascript,

<a href="http://example.com" onclick="window.open(this.href, '_blank', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;">Example Link</a>

这里是 JS Fiddle