<div class="codetitle"> <span><a style="CURSOR: pointer" data="73470" class="copybut" id="copybut73470" onclick="doCopy('code73470')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code73470"> <br><a href="#" onclick="clearNewMessageRemind();return false;">点击取消闪烁提示</a> <br><script type="text/javascript"> <BR>var newMessageRemind={ <BR>_step: 0, <BR>_title: document.title, <BR>_timer: null, <BR>//显示新消息提示 <BR>show:function(){ <BR>var temps = newMessageRemind._title.replace("【 】", "").replace("【新消息】", ""); <BR>newMessageRemind._timer = setTimeout(function() { <BR>newMessageRemind.show(); <BR>//这里写Cookie操作 <BR>newMessageRemind._step++; <BR>if (newMessageRemind._step == 3) { newMessageRemind._step = 1 }; <BR>if (newMessageRemind._step == 1) { document.title = "【 】" + temps }; <BR>if (newMessageRemind._step == 2) { document.title = "【新消息】" + temps }; <BR>}, 800); <BR>return [newMessageRemind._timer, newMessageRemind._title]; <BR>}, <BR>//取消新消息提示 <BR>clear: function(){ <BR>clearTimeout(newMessageRemind._timer ); <BR>document.title = newMessageRemind._title; <BR>//这里写Cookie操作 <BR>} <BR>}; <BR>newMessageRemind.show(); <BR>function clearNewMessageRemind() { <BR>newMessageRemind.clear(); <BR>} <BR></script> <br> </div>