Guest User

Untitled

a guest
Mar 18th, 2018
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4.  
  5. <script src="https://code.jquery.com/jquery-1.12.1.js" integrity="sha256-VuhDpmsr9xiKwvTIHfYWCIQ84US9WqZsLfR4P7qF6O8=" crossorigin="anonymous"></script>
  6. <script>
  7. window.SomeDeleteRowFunction = function SomeDeleteRowFunction(o) {
  8. var p=o.parentNode.parentNode;
  9. p.parentNode.removeChild(p);
  10. }
  11.  
  12. $('document').ready(function() {
  13. $('.add_another').click(function() {
  14. $("#tbl").append('<tr><td><input type="text" class="txtbox" value="" placeholder=x.rowIndex/> </td></tr>');
  15. });
  16. })</script>
  17.  
  18. <table id="tbl">
  19. <tr>
  20.  
  21. </tr>
  22. <tr>
  23. <td><input type="text" name="links" placeholder=x.rowIndex /></td>
  24. <td><input type="button" value="Delete Row" onclick="SomeDeleteRowFunction(this)"/></td>
  25. </tr>
  26. </table>
  27. <input type="submit" class="button add_another" value="Add another line"/>
  28.  
  29. </body>
  30. </html>
Add Comment
Please, Sign In to add comment