自己早期写的js代码,回味一下

if (IsIE())
{
divobj.onmousemove = function () { mousemove(event, v_i); };
divobj.onmousedown = function () { mousedown(event, v_i); };
divobj.onmouseup = function () { mouseup(event, v_i); };
divobj.onmouseover = function () { mouseover(event, v_i); };
divobj.onmouseout = function () { mouseout(event, v_i); };

lt.onmouseover = function() { ltmouseover(event, v_i); };
lt.onmouseup = function() { ltmouseup(event, v_i); };
lt.onmousedown = function() { ltmousedown(event, v_i); };
lt.onmouseout = function() { ltmouseout(event, v_i); };

lb.onmouseover = function() { lbmouseover(event, v_i); };
lb.onmouseup = function() { lbmouseup(event, v_i); };
lb.onmousedown = function() { lbmousedown(event, v_i); };
lb.onmouseout = function() { lbmouseout(event, v_i); };

rt.onmouseover = function() { rtmouseover(event, v_i); };
rt.onmouseup = function() { rtmouseup(event, v_i); };
rt.onmousedown = function() { rtmousedown(event, v_i); };
rt.onmouseout = function() { rtmouseout(event, v_i); };

rb.onmouseover = function() { rbmouseover(event, v_i); };
rb.onmouseup = function() { rbmouseup(event, v_i); };
rb.onmousedown = function() { rbmousedown(event, v_i); };
rb.onmouseout = function() { rbmouseout(event, v_i); };
}
else
{
lt.addEventListener("mouseover", function (evnt) {ltmouseover(evnt, v_i);}, false);
lt.addEventListener("mouseup", function (evnt) {ltmouseup(evnt, v_i);}, false);
lt.addEventListener("mousedown", function (evnt) {ltmousedown(evnt, v_i);}, false);
lt.addEventListener("mouseout", function (evnt) {ltmouseout(evnt, v_i);}, false);

lb.addEventListener("mouseover", function (evnt) {lbmouseover(evnt, v_i);}, false);
lb.addEventListener("mouseup", function (evnt) {lbmouseup(evnt, v_i);}, false);
lb.addEventListener("mousedown", function (evnt) {lbmousedown(evnt, v_i);}, false);
lb.addEventListener("mouseout", function (evnt) {lbmouseout(evnt, v_i);}, false);

rt.addEventListener("mouseover", function (evnt) {rtmouseover(evnt, v_i);}, false);
rt.addEventListener("mouseup", function (evnt) {rtmouseup(evnt, v_i);}, false);
rt.addEventListener("mousedown", function (evnt) {rtmousedown(evnt, v_i);}, false);
rt.addEventListener("mouseout", function (evnt) {rtmouseout(evnt, v_i);}, false);

rb.addEventListener("mouseover", function (evnt) {rbmouseover(evnt, v_i);}, false);
rb.addEventListener("mouseup", function (evnt) {rbmouseup(evnt, v_i);}, false);
rb.addEventListener("mousedown", function (evnt) {rbmousedown(evnt, v_i);}, false);
rb.addEventListener("mouseout", function (evnt) {rbmouseout(evnt, v_i);}, false);
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值