![]() ![]() ![]() ![]() |
|||||
|
|||||
樓主 站務人員 站長 ![]()
![]() ![]() ![]() |
text1的最大長度為4 當使用者填滿4個字後 游標可自動移到text2中 <html> <script language="JavaScript"> function test() { if (form1.id.value.length == 4) { form1.name.focus(); } } </script> </head> <body bgcolor="#FFFFFF"> <form name="form1" > <input type="text" name="id" onkeypress="test()"> <input type="text" name="name"> </form> </body> </html>
本篇文章發表於2002-01-14 00:00
|