在新页面中显示图像

时间:2011-01-01 12:43:20

标签: c# asp.net

我有解决方案,显示图像,我想在点击显示的图像时显示在新页面中,原始尺寸。我该怎么办?

2 个答案:

答案 0 :(得分:1)

如果您只想显示图像,可以直接链接到图像。

<a href="path to image"><img src="path to image" alt="" target="_blank" /></a>

target="_blank"会在新窗口/标签页中将其打开。

答案 1 :(得分:0)

只需按Firebug检查stackoverflow上的其中一个图片,然后更改href标记的a

<a title="" target="_blank" rel="nofollow" 
     href="http://static.adzerk.net/Advertisers/3099.jpg">
  <img width="220" height="250" border="0" alt="" title="" 
         src="http://static.adzerk.net/Advertisers/3099.jpg">
</a>
相关问题