如果不支持网页对话框就再新窗口打开 目的: 图片自动缩小 点击放大 输入: 无 返回: 无 function $(obj){ return document.getElementById(obj); } function ResizeImage(objImage,maxWidth) { try{ if(maxWidth>0){ var objImg = $(objImage); if(objImg.width()>maxWidth){ objImg.width(maxWidth).css("cursor","pointer").click(function(){ try{showModelessDialog(objImage.src);}catch(e){window.open(objImage.src);} }); } } }catch(e){}; }
推荐阅读
兼容ie ff div 层 打开+关闭+ 拖动+遮罩+移动+动画改变高宽
1 拖动+遮罩+移动+改变元素大小
popper.w's code
body{text-align:center}
#dd{ margin:50px auto}
#odiv{ width:400px; height:200px;border:1px dotted red; border:1px >>>详细阅读
本文标题:图片自动缩小 点击放大
地址:http://www.17bianji.com/kaifa2/JS/29548.html
1/2 1