请问那位大哥做过:在asp.net网页中如果判断用户在规定的时间内,没有移动鼠标,先谢谢各位大哥了(100分)

W

wzjlg

Unregistered / Unconfirmed
GUEST, unregistred user!
M

menzhe

Unregistered / Unconfirmed
GUEST, unregistred user!
asp.net是不可能得到鼠标移动消息的!只能用js!
我给你实现了一个!本来想写一个ie也兼容的,但无奈
js我很差,只实现了个firefox的!花了我不少时间调试唻...
<html>
<body>
<script>
var ret;
var x="youdo
not move mouse in 2 second";
ret=window.setTimeout("myfunc()",2000);
document.onmousemove=Move;
function Move(event){
window.clearTimeout(ret);
window.captureEvents(Event.MOUSEMOVE);
ret=window.setTimeout("myfunc()",2000);
}
function myfunc()
{
alert('youdo
not move mouse in 2 second');
}
</script>
</body>
</html>
 

Similar threads

D
回复
0
查看
2K
DelphiTeacher的专栏
D
D
回复
0
查看
2K
DelphiTeacher的专栏
D
D
回复
0
查看
1K
DelphiTeacher的专栏
D
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
顶部