JS title栏文字不间断滚动

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>TITLE栏上滚动的文字</title>
<script language=javascript >
var text=document.title
var timerID
function newtext() {
clearTimeout(timerID)
document.title=text.substring(1,text.length)+text.substring(0,1)
text=document.title.substring(0,text.length)
timerID = setTimeout("newtext()", 100)
}
</script>
</head>
<body onload="newtext()"></body>
</body>
</html>
<html>
<head>

 

效果图:
JS title栏文字不间断滚动_第1张图片
 

 

 

你可能感兴趣的:(JS title栏文字不间断滚动)