类似WEBQQ新消息的标题滚动

复制代码

function rolltitle()
{
    timerID 
= window.setInterval("newtext()"500); //定时器 间隔500ms 调用一次 newtext()
}
function stoprolltitle()
{
    window.clearInterval(timerID);

}
function newtext()
{
    text 
= top.document.title;
    top.document.title
=text.substring(1,text.length)+text.substring(0,1)
    text
=top.document.title.substring(0,text.length)
}
复制代码
posted on   onle  阅读(411)  评论(0)    收藏  举报
努力加载评论中...

点击右上角即可分享
微信分享提示