您的位置:首页 > Web前端 > JavaScript

js 改变浏览器标题

2011-10-20 16:40 162 查看
代码:

<!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);
// ]]>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: