闪啊闪的窗口标题栏

<script language="JavaScript">
    var step=0
    function flash_title()
    {
        step++
        if (step==3) {step=1}
        if (step==1) {document.title='【你有新的消息】'}
        if (step==2) {document.title='【      】'}
        setTimeout("flash_title()",380);
    }
    flash_title()
</script>

 

 

随着单页面的项目越来越多,同时也会因为是单页面,所以title都是只有一个,可以使用document.title来设值

posted @ 2017-07-31 16:00  莺哥  阅读(116)  评论(0编辑  收藏  举报