<html>
<head>
<title>跑馬燈</title>
<style type="text/css">
<!--
body{
background-color:#000000; /* 頁(yè)面背景色 */
}
input{
background:transparent; /* 輸入框背景透明 */
border:none; /* 無(wú)邊框 */
color:#ffb400;
font-size:45px;
font-weight:bold;
font-family:黑體;
}
-->
</style>
<script language="javascript">
var msg="這是跑馬燈,我跑啊跑啊跑"; //跑馬燈的文字
var interval = 400; //跑動(dòng)的速度
var seq=0;
function LenScroll() {
document.nextForm.lenText.value = msg.substring(seq, msg.length) + " " + msg;
seq++;
if ( seq > msg.length )
seq = 0;
window.setTimeout("LenScroll();", interval);
}
</script>
</head>
<body onLoad="LenScroll()">
<center>
<form name="nextForm">
<input type="text" name="lenText">
</form>
</center>
</body>