javascript实现任务栏消息提示的简单实例

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实现任务栏消息提示的简单实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持呐喊教程。