图片缩放(放大的时候另开一个窗口)
HTML部分:
1 <img width="300" id="b" src="1.png" alt="">
JAVASCRIPT部分:
var img = document.getElementById("b"); img.onclick = function(){ try{ imgPopup.close(); }catch(e){ } imgPopup=window.open('','','') imgPopup.document.write('<script>document.onclick=function(){ close();}<\/script>'); imgPopup.document.write('<img src="'+this.src+'"/>','<style>body{margin:0;padding:0;border:0;}<\/style>'); imgPopup.focus(); imgPopup.document.close(); }

浙公网安备 33010602011771号