发布网友 发布时间:2025-01-03 11:02
共1个回答
热心网友 时间:7分钟前
稍改下就行了:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网页特效|Linkweb.cn/Js|---标题栏里的打字效果</title>
</head>
<body>
<script language="JavaScript1.2">
var message="欢迎进入网页特效观止"
var message=message+" "
i="0"
var temptitle=""
var speed="150"
function titler(){
if (!document.all&&!document.getElementById)
return
document.title=temptitle+message.charAt(i)
temptitle=temptitle+message.charAt(i)
i++
if(i==message.length)
{
i="0"
temptitle=""
}
setTimeout("titler()",speed)
}
var Message="啊啊啊啊啊啊";
var place=1;
function scrollIn() {
window.status=Message.substring(0, place);
if (place >= Message.length) {
place=1;
window.setTimeout("scrollOut()",300);
} else {
place++;
window.setTimeout("scrollIn()",50);
}
}
function scrollOut() {
window.status=Message.substring(place, Message.length);
if (place >= Message.length) {
place=1;
window.setTimeout("scrollIn()", 100);
} else {
place++;
window.setTimeout("scrollOut()", 50);
}
}
window.onload=titler;scrollIn()
</script>
</body>
</html>