1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
  2. <html xmlns="http://www.w3.org/1999/xhtml">  
  3. <head>  
  4. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />  
  5. <title>无标题文档</title>  
  6. </head>  
  7. <script>  
  8.     function keyJump1(obj){   
  9.         if(obj.length==4) {   
  10.             document.all.temp1.focus();   
  11.                
  12.         }   
  13.     }   
  14.     function keyJump2(obj){   
  15.        
  16.         if(obj.length==6)    
  17.         {   
  18.             document.all.temp2.focus();   
  19.         }   
  20.     }   
  21.     function keyJump3(obj){   
  22.         if(obj.length==8) document.all.temp3.focus();   
  23.     }   
  24.     function keyJumpTemp(obj){   
  25.         obj.focus();   
  26.     }   
  27. </script>  
  28. <body>  
  29. <table  border="0">  
  30.     <tr>  
  31.         <td><input name="personNumber1" type="text" class="textbox" style=" width:030; height:20 " onfocus="this.select()" onkeyup='keyJump1(this.value)' maxlength="4"></td>  
  32.         <td id="temp1"  width="005" onkeyup="keyJumpTemp(document.all.personNumber2)">-</td>  
  33.         <td ><input name="personNumber2" type="text" class="textbox" style=" width:040; height:20" onfocus="this.select()" onkeyup='keyJump2(this.value)' maxlength="6"></td>  
  34.         <td id="temp2" width="005" onkeyup="keyJumpTemp(document.all.personNumber3)">-</td>  
  35.         <td ><input name="personNumber3" type="text" class="textbox" style=" width:055; height:20" onfocus="this.select()" onkeyup='keyJump3(this.value)' maxlength="8"></td>  
  36.         <td id="temp3" width="005" onkeyup="keyJumpTemp(document.all.personNumber4)">-</td>  
  37.         <td ><input name="personNumber4" type="text" class="textbox" style=" width:010; height:20" onfocus="this.select()" onkeyup='' maxlength="1"></td>  
  38.     </tr>  
  39. </table>       
  40. </body>  
  41. </html>