<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>html-www.51windows.Net</title> </head> <body> 以下四個文本框,每個限輸入四個字符,輸入完后自動跳到下一文本框 <script ID="clientEventHandlersJS" LANGUAGE="javascript"> <!-- function T1_onkeyup() { if(document.card.T1.value.length==4){ document.card.T2.focus(); } } function T2_onkeyup() { if(document.card.T2.value.length==4){ document.card.T3.focus(); } } function T3_onkeyup() { if(document.card.T3.value.length==4){ document.card.T4.focus(); } } //--> </script> <form method="POST" name="card" action> 輸入字符: <input type="text" name="T1" size="4" maxlength="4" LANGUAGE="javascript" onkeyup="return T1_onkeyup()">- <input type="text" name="T2" size="4" maxlength="4" LANGUAGE="javascript" onkeyup="return T2_onkeyup()">- <input type="text" name="T3" size="4" maxlength="4" LANGUAGE="javascript" onkeyup="return T3_onkeyup()">- <input type="text" name="T4" size="4" maxlength="4"> </form> </body> </html> <p style="position: absolute; top: 10; right: 10; width: 148; height: 18;cursor:hand"> <input type="button" name="Button" value="查看源代碼" onClick= 'window.location = "view-source:" + window.location.href'></p>
聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時與本網(wǎng)聯(lián)系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com