html
<html xmlns="http://www.3c.org/1999/xhtml">
<head>
<meta http-euquiv="content-type" content="text/html;charset=utf-8"/>
<title>跑马灯效果</title>
<style type="text/css">
body{background-color: #000;}
input{
background: transparent;
border: none;
color: #F00;
font-size: 30px;
font-weight:bold;
font-family: "黑体";
}
<form name="nextForm">
<input type="text" name="lenText" value="" />
</form>
<script type="text/javascript">
var msg="我是跑马灯文字,跑啊跑啊跑~~~~~~";
var interval=400;
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);
}
LenScroll();
</script>
</head>
<body onload="LenScroll()">
</body>
</html>