導航:首頁 > 動漫圖片 > 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點擊圖片放大效果怎麼做相關的資料

熱點內容
心痛女孩子的動態圖片 瀏覽:200
女孩白色內內圖片 瀏覽:209
入冬早上好文字圖片 瀏覽:620
帥氣男生換裝圖片 瀏覽:220
短發面條卷發型圖片 瀏覽:1005
可愛小孩子圖片賣萌 瀏覽:642
花的圖畫手繪簡單圖片 瀏覽:775
動漫公主服裝圖片大全圖片大全 瀏覽:177
動漫繪畫作品圖片 瀏覽:130
小女孩幾幾的現狀圖片 瀏覽:308
櫻花圖片動漫圖 瀏覽:744
成熟潮男搭配衣服圖片 瀏覽:173
動漫人物圖片大全黑白 瀏覽:1091
最多動漫圖片 瀏覽:847
小鳥衣服圖片大全可愛 瀏覽:512
手擋太陽的圖片女生 瀏覽:559
男女生圖片背影圖片 瀏覽:1094
想太多心會累文字圖片 瀏覽:435
簡單動漫圖片教程視頻 瀏覽:626
女孩發育圖片視頻 瀏覽:624