<html>
<head>
<script src=”https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js”></script>
</head>
<body>
<table border=”1″ id=”table”>
<input type=”button” name=”btn” id=”btn” value=”add”>
<tr>
<td><input type=”text” name=”name[]”></td>
</tr>
</table>
<script>
$(‘#btn’).click(function () {
$(‘#table’).append(‘<tr><td><input type=”text” name=”name[]”></td></tr>’);
});
</script>
</body>
</html>
I think this code will help you. Lets enjoy with this code.
Question and answer is powered by AnsPress.io