如何使php图像链接在新窗口中打开 [英] how to make php image link open in a new window
本文介绍了如何使php图像链接在新窗口中打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经创建了php链接,但我想要在一个新窗口中打开一个特定的大小。任何人从这里提出任何建议?链接是一个图像。
I had make a php link but i want it to open in a specific size in a new window.Can anyone from here suggest anything?The link is an image.
echo "<td><center><a href=\"edituser.php?id=$row[id]\"><img src=image/edit.png></a></center></td>";
链接与数据库连接。它将打开一个表单来编辑用户数据。 >
the link is connect with the database.It will open a form to edit user data.
推荐答案
要在新窗口中打开,您必须将目标添加到您的标签,例如:
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
这篇关于如何使php图像链接在新窗口中打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文