求助(急):图片放大代码 现在在很多论坛上见过一个图片功能,当发的帖子当中有图片的时候,点击图片就会出现一个放大图片的功能,随着鼠标滚轮的转动,图片出现放大和缩小,我搜索了百度,没有找到这个代码,请提供一下,谢谢! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 sample:<img id=img1></img><script>var obj=document.getElementById("img1");obj.style.width="20px";obj.style.height="20px";obj.onclick=function(){ this.style.width="100px"; this.style.height="100px";};document.onmousewheel =function(){ if(event.wheelDelta>0){ if(parseInt(obj.style.width)>1024)return; obj.style.width=parseInt(obj.style.width)*1.5+"px"; obj.style.height=parseInt(obj.style.height)*1.5+"px"; }else{ if(parseInt(obj.style.width)<10)return; obj.style.width=parseInt(obj.style.width)/1.5+"px"; obj.style.height=parseInt(obj.style.height)/1.5+"px"; } };</script> 半透明:filter:alpha(style=0,opacity=30) 选择下拉框的值 显示在同一页面的表格中 怎么实现? js 一些问题 关于css定义div问题 类似excel那样冻结(固定)网页表格Table上部的标题行和左侧的某几列 怎样关闭父 showModalDialog 窗口。 请问如何用js读取下面asp写的cookie 比较两个时间大小 问两个小问题 ???我有一个小问题?? 高手才能解决的问题. JS在html页面之间的传值和调用JS方法 求一个简单的js弹出框效果
<img id=img1></img>
<script>
var obj=document.getElementById("img1");
obj.style.width="20px";
obj.style.height="20px";
obj.onclick=function(){
this.style.width="100px";
this.style.height="100px";
};
document.onmousewheel =function(){
if(event.wheelDelta>0){
if(parseInt(obj.style.width)>1024)return;
obj.style.width=parseInt(obj.style.width)*1.5+"px";
obj.style.height=parseInt(obj.style.height)*1.5+"px";
}else{
if(parseInt(obj.style.width)<10)return;
obj.style.width=parseInt(obj.style.width)/1.5+"px";
obj.style.height=parseInt(obj.style.height)/1.5+"px";
}
};
</script>