test8_2.htm <HTML> <HEAD> </HEAD> <p align="center"> </p> <div align="center"><center> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td width="100%"><form name="form2" onSubmit="null"> <p><input type="submit" name="banner" VALUE="Submit" onClick="alert('这是一个动态按扭的例子')"> <br> <script language="JavaScript"> var id,pause=0,position=0; function banner() { // variables declaration var i,k,msg="这里输入你要的内容";// increase msg k=(30/msg.length)+1; for(i=0;i<=k;i++) msg+=" "+msg; // show it to the window document.form2.banner.value=msg.substring(position,position-30); // set new position if(position++==msg.length) position=0; // repeat at entered speed id=setTimeout("banner()",180); } // end --> banner(); </script></p> </form> </td> </tr> </table> </center></div> <p> </p> <BODY> <A href="test8_1.htm">返回</a> </BODY> </HTML>
本讲介绍了使用JavaScript脚本实现Web页面信息交互的方法。其中主要介绍了窗体中的基本元素的主要 上一页 [1] [2] [3] [4] [5] 下一页
|