JS写跑马灯
<script type="text/javascript" >
function show() { var info = document.getElementById('Text1'); info.value = info.value.substr(1) + info.value[0]; } setInterval(show, 500); function show1() { var info1 = document.getElementById('Text2'); info1.value = info1.value[info1.value.length-1] + info1.value.substr(0, info1.value.length-1); } setInterval(show1, 500);
</script>
<input id="Text1" type="text" value="欢迎来测试 " /> <input id="Button1" type="button" value="滚动"/><br /> <input id="Text2" type="text" value=" 北京欢迎您" /> <input id="Button2" type="button" value="滚动" onclick="show1()" />