<div class="rows">
<input type="text" id="ip1" class="ip1">
<input type="text" id="ip2" class="ip2">
<input type="button" value="Delete" id="del" class="del">
</div><!--Rows-->
<script>
$(document).ready(function(e){
$("#add").click(function(e){
$(".rows").append('<input type="text" id="ip1" class="ip1">'+
'<input type="text" id="ip1" class="ip1">'+
'<input type="button" alue="Delete" id="del" class="del">');
});
});
</script>
I Did this using this method. Is there any other good method like appending the whole div.
and i need to delete that row alone if i click delete button,
Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…