当有新消息或者网页有Ajax内容变动时, 可以闪动浏览器标题(或者Tab标题), 提示用户. <br><!--<br/>function BlinkTitle(title, timeout){<br/> var self = this;<br/> var timer = null;<br/> var backup = document.title;</p><p> self.start = function(title, timeout){<br/> self.stop();</p><p> if(title != undefined){<br/> self.title = title;<br/> }<br/> self.timeout = timeout == undefined? 600: timeout;</p><p> function blink(){<br/> document.title = document.title == backup? self.title : backup;<br/> }<br/> blink();<br/> timer = setInterval(blink, self.timeout);<br/> }</p><p> self.stop = function(){<br/> if(timer != null){<br/> document.title = backup;<br/> clearInterval(timer);<br/> timer = null;<br/> }<br/> }</p><p> self.start(title, timeout);<br/>}</p><p>var blink = new BlinkTitle('12345');<br/>//--><br> stop