javascript實現任務欄消息提示的簡單實例
<html> <body onload="blurFunc();"> <script> function blurFunc() { setTimeout("setTitle1()","1000"); } var flag=0; var id = setTimeout("setTitle1()","1000"); var id1 = setTimeout("setTitle2()","1000"); function setTitle1() { if(flag=="1") { return; } document.title="消息提醒"; setTimeout("setTitle2()","1000"); } function setTitle2() { document.title="XXXXXX"; setTimeout("setTitle1()","1000"); } setTimeout("clear()",10000); function clear() { flag = "1"; } </script> </body> </html>
以上這篇javascript實現任務欄消息提示的簡單實例就是小編分享給大家的全部內容了,希望能給大家一個參考,也希望大家多多支持。