Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>testing</title>
- <SCRIPT language="JavaScript" SRC="yourpathto/jquery-min-1-4-2.js"></SCRIPT>
- </head>
- <body>
- <script>
- function myOnChange(context,curNum){
- nextNum = curNum+1;
- $(context.parentNode).append('<input type="text" onchange="return myOnChange(this,'+nextNum+')" id="prefix_'+nextNum+'" />');
- $('#prefix_'+nextNum).focus();
- return false;
- }
- </script>
- <div>
- <input type="text" onchange="return myOnChange(this,1);" id="prefix_1"/>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement