JS动态改变浏览器标题的方法
本文实例讲述了JS动态改变浏览器标题的方法。分享给大家供大家参考,具体如下:
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<htmlxmlns="http://www.w3.org/1999/xhtml">
<head>
<title>无标题页</title>
<linkid="link1"rel="ShortcutIcon"href="1.ico"/>
</head>
<bodystyle="cursor:url(1.cur);height:100%;">
<scripttype="text/javascript">
varbo=true;
vartitle=document.title;
window.setInterval(function(){
document.title=(bo?'[信]':'[★]')+title;
bo=!bo;
},500);
</script>
设置为100毫秒时,火狐正常,IE、Chrome都不正常。
</body>
</html>
这里注意:改变document.title的时间间隔设置为100毫秒时,火狐正常,IE、Chrome都不正常。
设置浏览器小图标:
<linkid="link1"rel="ShortcutIcon"href="1.ico"/>
改变鼠标样式:
<bodystyle="cursor:url(1.cur);">
更多关于JavaScript相关内容感兴趣的读者可查看本站专题:《JavaScript+flash技巧与特效大全》、《JavaScript切换特效与技巧总结》、《JavaScript查找算法技巧总结》、《JavaScript动画特效与技巧汇总》、《JavaScript错误与调试技巧总结》、《JavaScript数据结构与算法技巧总结》、《JavaScript遍历算法与技巧总结》及《JavaScript数学运算用法总结》
希望本文所述对大家JavaScript程序设计有所帮助。