源代码及使用说明 |
拷贝下面的代码到你的html文件的<head>和</head>之间;
<script LANGUAGE="JavaScript">
<!-- Begin
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);
}
}
// End -->
</script>
修改你的<body>语句为;<BODY onLoad="scrollIn()">
说明:其中的50是显示的速度
|