W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<html> <head> <script type="text/javascript"> message="最好的学习方法,是学习实例。-www.W3School.org.cn" pos=0 maxlength=message.length+1 function writemsg() { if (pos<maxlength) { txt=message.substring(pos,0) document.forms[0].msgfield.value=txt pos++ timer=setTimeout("writemsg()", 50) } } function stoptimer() { clearTimeout(timer) } </script> </head> <body onload="writemsg()" onunload="stoptimer()"> <form> <input id="msgfield" size="65"> </form> </body> </html>