使用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> extjs 参数作用域 显示不全加上滚动条也显示不出来? 如何用js实现点击标签之后改变标签 如何用js修改TITLE aptana 1.1 为什么不支持中文?而且用来Run html 页是总是在Firefox中打开aptana 的主页? 请问怎么用datasrc填充select的option呀? HTNL 里div 快被气的吐血了,请各位帮忙看看哪里的问题 怎样使指定文本框中输入内容时,输入法不可选,只能输入半角英文? 关于正则表达式的问题! 怎么用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>