Button跑馬燈

將下列程式碼複製至<head>程式碼</head>區內

<script language="Javascript">
<!--
var speed = 80
var message = "秦時明月漢秦關,萬里長征人未還,但使龍城飛將在,不教胡馬渡陰山! "

var s = 0
var l = message.length
document.write("<center><form name='btn'><input type='button'"
+"name='sc' value='"+ message +"'></form></center>")

function btnsc() {

document.btn.sc.value = message.substring(s,l) + message.substring(0,s)
s++

if (s >= l) {
s = 0
}

setTimeout("btnsc()",speed)
}

btnsc();
//-->
</script>