懶就要懶到底——鼠標自動點擊(含時間判斷)
更新時間:2007年02月20日 00:00:00 作者:
其實老早之前就已經(jīng)做完了,這次稍微改進一下
瀏覽地址: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 >鼠標放在這個鏈接上1.5秒以上,將進入藍色理想網(wǎng)站,當然不到1.5秒就沒有效果</a></p>
<p><a >同理移到這里將進入我的blog</a></p>
<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>
瀏覽地址: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 >鼠標放在這個鏈接上1.5秒以上,將進入藍色理想網(wǎng)站,當然不到1.5秒就沒有效果</a></p>
<p><a >同理移到這里將進入我的blog</a></p>
<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>
相關文章
使用typescript改造koa開發(fā)框架的實現(xiàn)
這篇文章主要介紹了使用typescript改造koa開發(fā)框架的實現(xiàn),文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2020-02-02
layui 數(shù)據(jù)表格 點擊分頁按鈕 監(jiān)聽事件的實例
今天小編就為大家分享一篇layui 數(shù)據(jù)表格 點擊分頁按鈕 監(jiān)聽事件的實例,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧2019-09-09
基于js原生和ajax的get和post方法以及jsonp的原生寫法實例
下面小編就為大家?guī)硪黄趈s原生和ajax的get和post方法以及jsonp的原生寫法實例。小編覺得挺不錯的,現(xiàn)在就分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2017-10-10

