在有信息提示时需要在网页标题中滚动,下边是JS实现的,以备以后使用
<html> <head> <title></title> <script type="text/javascript"> var msg = "您有1条新消息"; var delay = 200; var timeID; function scrollTitle(flag) { if (!flag) { window.document.title = "VCSOA"; clearTimeout(timeID); } else { window.document.title = msg; msg = msg.substring(1, msg.length) + msg.substring(0, 1); timeID = setTimeout("scrollTitle(true)", delay); } } </script> </head> <body> <input type="button" onclick="scrollTitle(true);" value="你有新消息"/> <input type="button" onclick="scrollTitle(false);" value="收到"/> </body> </html>