当前位置:编程学习 > JS >>

懒就要懒到底——鼠标自动点击(含时间判断)

答案:其实老早之前就已经做完了,这次稍微改进一下
浏览地址:http://www.healdream.com/upload/html/autoclick.html

复制代码 代码如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script src="yahoo.js" type="text/javascript"></script>
<script src="event.js" type="text/javascript"></script>

</head>

<body>
<p><a href=><p><a href=><script type="text/javascript">
var links=document.getElementsByTagName("a");
function return_obj(){
return source;
}
function auto_click(str){
window.location=str;
}
function mouseover_func(e){
source=event.srcElement;
start=setTimeout("auto_click('"+source+"')",1500);
}
function mouseout_func(e){
clearInterval(start);
}
YAHOO.util.Event.addListener(links,"mouseover",mouseover_func);
YAHOO.util.Event.addListener(links,"mouseout",mouseout_func);
</script>

</body>
</html>

上一个:用Javascript做flash做的事..才完成的一个类.Auntion Action var 0.1
下一个:SUN的《AJAX与J2EE》全文译了

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,