https://www.jqueryscript.net/demo/duplicate-remove-rows-patuta/
<div>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript">
$(function () {
$('#btnTransfer').on('click', function () {
var tr = $("#dvOrders").find("TR:has(td)").clone();
$("#main").append(tr);
});
});
</script>
<img alt="" style="cursor: pointer" src="../images/plus.png">
<table id="dvOrders" class="secondtable">
<tbody>
<tr>
<th>
S.No
</th>
<th>
S.ID
</th>
<th>
tid
</th>
<th>
topic name
</th>
<th>
video url
</th>
<th>
Notes url
</th>
<th>
tdesc
</th>
<th>
assignid
</th>
<th>
assign name
</th>
<th>
free
</th>
</tr>
<tr>
<td>
</td>
<td>
3
</td>
<td>
8
</td>
<td>
Hello NEW
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
1
</td>
<td>
<input type="text" />
</td>
<td>
True
</td>
</tr>
<tr>
<td>
</td>
<td>
3
</td>
<td>
8
</td>
<td>
Hello NEW
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
1
</td>
<td>
<input type="text" />
</td>
<td>
True
</td>
</tr>
</tbody>
</table>
</div>
<br />
<input type="button" onclick="" value="NEW EXTEA OT" id="btnTransfer" />
<table id="main">
<tr>
<th>
S.No
</th>
<th>
S.ID
</th>
<th>
tid
</th>
<th>
topic name
</th>
<th>
video url
</th>
<th>
Notes url
</th>
<th>
tdesc
</th>
<th>
assignid
</th>
<th>
assign name
</th>
<th>
free
</th>
</tr>
</table>
</div>
No comments:
Post a Comment
I am Safiqul Islam Tuhin