<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>^_^欢迎浏览本网站</title>
</head>
<body>
</body>
<script type="text/javascript">
var position=0;
var message='^_^欢迎浏览本网站';
var x=2*(60/message.length);//要保证是两倍
var newstr='';
for(var i=0;i<x;i++){
newstr+=message
}
function titleTex(){
var title=newstr.substring(position,position+60);
position++;
if(position==60){//刚好截取到尾巴
position=0;
}
document.title=title;
}
setInterval(titleTex,150);
</script>
</html>
网友评论