Advertisement
Guest User

example

a guest
Mar 2nd, 2011
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.51 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title>testing</title>
  4. <SCRIPT language="JavaScript" SRC="yourpathto/jquery-min-1-4-2.js"></SCRIPT>
  5. </head>
  6. <body>
  7. <script>
  8. function myOnChange(context,curNum){
  9.       nextNum = curNum+1;
  10.       $(context.parentNode).append('<input type="text" onchange="return myOnChange(this,'+nextNum+')" id="prefix_'+nextNum+'" />');
  11.       $('#prefix_'+nextNum).focus();
  12.       return false;
  13. }
  14. </script>
  15. <div>
  16. <input type="text" onchange="return myOnChange(this,1);" id="prefix_1"/>
  17. </div>
  18. </body>
  19. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement