js 改变浏览器标题
2011-10-20 16:40
162 查看
代码:
注意 改变document.title的时间间隔设置为100毫秒时,火狐正常,IE、Chrome都不正常。
设置浏览器小图标 <link id="link1" rel="Shortcut Icon" href="1.ico" />
改变鼠标样式 <body style="cursor:url(1.cur); ">
// var bo = true;
var title = document.title;
window.setInterval(function(){
document.title = (bo?'[信]':'[★]') + title;
bo = !bo;
},500);
// ]]>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>无标题页</title> <link id="link1" rel="Shortcut Icon" href="1.ico" /> </head> <body style="cursor:url(1.cur); height:100%;"> <script type="text/javascript"> var bo = true; var title = document.title; window.setInterval(function(){ document.title = (bo?'[信]':'[★]') + title; bo = !bo; },500); </script> 设置为100毫秒时,火狐正常,IE、Chrome都不正常。 </body> </html>
注意 改变document.title的时间间隔设置为100毫秒时,火狐正常,IE、Chrome都不正常。
设置浏览器小图标 <link id="link1" rel="Shortcut Icon" href="1.ico" />
改变鼠标样式 <body style="cursor:url(1.cur); ">
// var bo = true;
var title = document.title;
window.setInterval(function(){
document.title = (bo?'[信]':'[★]') + title;
bo = !bo;
},500);
// ]]>
相关文章推荐
- JS动态改变浏览器标题的方法
- 文章标题js将网页表格导出为excel表格(兼容各种浏览器)
- js判断浏览器改变大小时触发事件
- js实现浏览器窗口大小被改变时触发事件的方法
- 浏览器的缓存究竟是什么?为什么j2ee的web工程的js明明修改了,但是浏览器中展示的,并没有改变,还是之前的,即和j2ee的web工程的代码中的不一致
- 实时监听js改变value,跨浏览器支持
- 在改变了JS文件,而浏览器依然加载的是之前没改变之前的js文件的问题
- js—当浏览器窗口大小改变时事件
- 实时监听js改变value,跨浏览器支持
- js 里改变浏览器的url
- 纯js实现Div在页面垂直居中!可根据浏览器大小的改变而改变!兼容各种浏览器----神器版!
- javascript修改浏览器title方法 JS动态修改浏览器标题
- 实时监听js改变value,跨浏览器支持
- 实时监听js改变value,跨浏览器支持
- js实现浏览器窗口大小被改变时触发事件的方法
- 实时监听js改变value,跨浏览器支持
- js文件改变之后浏览器缓存问题怎么解决?
- 实时监听js改变value,触发事件,跨浏览器支持
- js浏览器窗口大小改变时事件
- 实时监听js改变value,跨浏览器支持 推荐