Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <body>
- <script src="https://code.jquery.com/jquery-1.12.1.js" integrity="sha256-VuhDpmsr9xiKwvTIHfYWCIQ84US9WqZsLfR4P7qF6O8=" crossorigin="anonymous"></script>
- <script>
- window.SomeDeleteRowFunction = function SomeDeleteRowFunction(o) {
- var p=o.parentNode.parentNode;
- p.parentNode.removeChild(p);
- }
- $('document').ready(function() {
- $('.add_another').click(function() {
- $("#tbl").append('<tr><td><input type="text" class="txtbox" value="" placeholder=x.rowIndex/> </td></tr>');
- });
- })</script>
- <table id="tbl">
- <tr>
- </tr>
- <tr>
- <td><input type="text" name="links" placeholder=x.rowIndex /></td>
- <td><input type="button" value="Delete Row" onclick="SomeDeleteRowFunction(this)"/></td>
- </tr>
- </table>
- <input type="submit" class="button add_another" value="Add another line"/>
- </body>
- </html>
Add Comment
Please, Sign In to add comment