使用javascript实现鼠标滑轮及按钮同时控制图片的大小 我这里是点放大缩小没反映,但是鼠标滚轮就有反映 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <html><head><meta http-equiy="content-type" content="text/html; charset=gb2312"><script type="text/javascript">var wheel = { move : function (e) { var e = window.event || e, o = e.srcElement || e.target, n = (e.wheelDelta || e.detail) > 0 ? -10 : 10; wheel.addN(o, n); }, addN : function (o, n) { o.style.width = o.offsetWidth + n; o.style.height = o.offsetHeight + n; }, add : function (o) { if (o.attachEvent) o.attachEvent("onmousewheel", wheel.move); else o.addEventListener("DOMMouseScroll", wheel.move, false); }};var n_onload = function () { wheel.add(document.getElementById("div"));},change = function (n) { wheel.addN(document.getElementById("div"), n);};if (window.attachEvent) window.attachEvent("onload", n_onload);else window.addEventListener("load", n_onload, false);</script></head><body><img id="div" height="100" width="100" src="11645336193746747_small.jpg" /><br /><input type="button" value="加" onClick="change(50)" /> <input type="button" value="减" onClick="change(-50)" /></body></html> IE8中img动态修改src时,内存不能释放的问题 将回调函数的参数值取出来 js匹配图片~ 提取alert对话框中的文字 jquery formvalidor 插件如何修改表单提交的文件呢?也就是action 请问下面点击按钮,图片就会变化,但这个功能不能实现,不知是哪里错了请帮忙指正. 如何建分布数据系统 问个关于ext datefield控件 取值的问题,应该很简单 求一效果 表格单元格里有一个表单,我想判断是不是<select>怎么办?可用分没了,我一定会加分 怎么用JavaScript读图片的Size:长度、宽度 如何允许编辑select控件?
<head>
<meta http-equiy="content-type" content="text/html; charset=gb2312">
<script type="text/javascript">
var wheel = {
move : function (e) {
var e = window.event || e,
o = e.srcElement || e.target,
n = (e.wheelDelta || e.detail) > 0 ? -10 : 10;
wheel.addN(o, n);
},
addN : function (o, n) {
o.style.width = o.offsetWidth + n;
o.style.height = o.offsetHeight + n;
},
add : function (o) {
if (o.attachEvent)
o.attachEvent("onmousewheel", wheel.move);
else
o.addEventListener("DOMMouseScroll", wheel.move, false);
}
};
var n_onload = function () {
wheel.add(document.getElementById("div"));
},
change = function (n) {
wheel.addN(document.getElementById("div"), n);
};
if (window.attachEvent)
window.attachEvent("onload", n_onload);
else
window.addEventListener("load", n_onload, false);
</script>
</head>
<body>
<img id="div" height="100" width="100" src="11645336193746747_small.jpg" />
<br /><input type="button" value="加" onClick="change(50)" /> <input type="button" value="减" onClick="change(-50)" />
</body>
</html>