導航:首頁 > 動漫圖片 > js點擊圖片放大效果怎麼做

js點擊圖片放大效果怎麼做

發布時間:2024-12-30 10:29:40

A. 點擊小圖看大圖的js,如何點擊大圖,能新窗口打開原始大圖

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>JS特效學院|JsWeb8.cn|---簡單的圖片放大展示效果</title>
<style type="text/css">
.spic a img{-moz-opacity:0.5; filter:alpha(opacity=50);border:0px;}
.spic a:hover{font-size:9px;}
.spic a:hover img{-moz-opacity:0.5; filter:alpha(opacity=100);cursor:hand;}
</style>
<script type="text/javascript">
function seeBig(_this) {
OpenWindow = window.open("", "img", "");//打開新窗口
OpenWindow.document.write("<html>");//為新窗口設定html代碼
OpenWindow.document.write("<head>");
OpenWindow.document.write("<title>例子</title>");
OpenWindow.document.write("</head>");
OpenWindow.document.write("<body>");
OpenWindow.document.write("<img src='" + _this.parentNode.getElementsByTagName("img")[0].src + "' alt='' /");
OpenWindow.document.write("</body>");
OpenWindow.document.write("</html>");
OpenWindow.document.close();
//註:document.write 一行只能出現一種標簽
//需要 OpenWindow.document.close();
}
</script>
</head>
<body>
<table border="0" width="100%" cellspacing="3" cellpadding="3">
<tr>
<td align="center"><span class="spic">
<a href="###" onclick="seeBig(this)" style="cursor:pointer">
<img border="0" src="http://www.jsweb8.cn/images/test001.jpg" width="50" height="50"></a></span></td>
<td align="center"><span class="spic">
<a href="###" onclick="seeBig(this)" style="cursor:pointer">
<img border="0" src="http://www.jsweb8.cn/images/test002.jpg" width="50" height="50"></a></span></td>
<td align="center"><span class="spic">
<a href="###" onclick="seeBig(this)" style="cursor:pointer">
<img border="0" src="http://www.jsweb8.cn/images/test003.jpg" width="50" height="50"></a></span></td>
<td align="center"><span class="spic">
<a href="###" onclick="seeBig(this)" style="cursor:pointer">
<img border="0" src="http://www.jsweb8.cn/images/test004.jpg" width="50" height="50"></a></span></td>
</tr>
<tr>
<td colspan="4" align="center" id="viewPic"><img id="view_img" border="0" src="http://www.jsweb8.cn/images/test001.jpg"></td>
</tr>
</table>
</body>
</html>

閱讀全文

與js點擊圖片放大效果怎麼做相關的資料

熱點內容
家用宮廷衣服圖片 瀏覽:133
簡單小人物畫畫圖片大全 瀏覽:100
賓士跑車系列價格和圖片大全 瀏覽:980
露背配發型圖片 瀏覽:167
馬東錫女生圖片 瀏覽:737
張含韻孔雀裝高清圖片 瀏覽:530
小姑娘真可愛圖片大全 瀏覽:58
靠圖片網站投稿收入如何 瀏覽:360
有晨光的帶文字早安圖片 瀏覽:664
蘋果切面圖片可愛 瀏覽:372
動漫變色龍圖片 瀏覽:447
螢火蟲動漫圖片大全 瀏覽:747
怎麼把圖片上的文字給消除掉 瀏覽:300
qq聊天如何連著發圖片 瀏覽:127
把美女燒死圖片 瀏覽:342
阿里巴巴圖片怎麼做 瀏覽:855
外扣齊肩發型圖片 瀏覽:367
能給圖片加文字的軟體 瀏覽:479
word裡面圖片如何淡化背景色 瀏覽:7
簡單握手圖片大全 瀏覽:953