手机
当前位置:查字典教程网 >编程开发 >Javascript教程 >懒就要懒到底——鼠标自动点击(含时间判断)
懒就要懒到底——鼠标自动点击(含时间判断)
摘要:其实老早之前就已经做完了,这次稍微改进一下浏览地址:http://www.healdream.com/upload/html/autocli...

其实老早之前就已经做完了,这次稍微改进一下

浏览地址:http://www.healdream.com/upload/html/autoclick.html

复制代码 代码如下:

<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<htmlxmlns="http://www.w3.org/1999/xhtml">

<head>

<metahttp-equiv="Content-Type"content="text/html;charset=gb2312"/>

<title>无标题文档</title>

<scriptsrc="yahoo.js"type="text/javascript"></script>

<scriptsrc="event.js"type="text/javascript"></script>

</head>

<body>

<p><ahref="http://www.blueidea.com">鼠标放在这个链接上1.5秒以上,将进入蓝色理想网站,当然不到1.5秒就没有效果</a></p>

<p><ahref="http://www.healdream.com/blog">同理移到这里将进入我的blog</a></p>

<scripttype="text/javascript">

varlinks=document.getElementsByTagName("a");

functionreturn_obj(){

returnsource;

}

functionauto_click(str){

window.location=str;

}

functionmouseover_func(e){

source=event.srcElement;

start=setTimeout("auto_click('"+source+"')",1500);

}

functionmouseout_func(e){

clearInterval(start);

}

YAHOO.util.Event.addListener(links,"mouseover",mouseover_func);

YAHOO.util.Event.addListener(links,"mouseout",mouseout_func);

</script>

</body>

</html>

【懒就要懒到底——鼠标自动点击(含时间判断)】相关文章:

JS实现定时自动关闭DIV层提示框的方法

jQuery实现控制文字内容溢出用省略号(…)表示的方法

Jquery使用css方法改变样式实例

javascript动态创建表格及添加数据实例详解

自动设为主页

JavaScript中反正弦函数Math.asin()的使用简介

javascript实现带下拉子菜单的导航菜单效果

JavaScript中用于生成随机数的Math.random()方法

Javascript监视变量变化的方法

移到这里,就会自动点击

精品推荐
分类导航