evripidesk
1 year ago

Add Show textbox

Posted 1 year ago by evripidesk

I have the below script to add / remove text boxes but I don't know how to post the value

<?php 
<script type="text/javascript">


$(function () {

$("#btnAdd").bind("click", function () {
var div = $("<tr />");
div.html(GetDynamicTextBox(""));
$("#TextBoxContainer").append(div);
});
$("body").on("click", ".remove", function () {
$(this).closest("tr").remove();
});
});
function GetDynamicTextBox(value) {


return '<td><textarea name = "product"  type="text" ' + value + '" class="form-control" /></td>'  + value + '" /></td>'+ '<td><textarea name = "product" type="text"' + value + '" class="form-control" /></td>' + '<td><button type="button" class="btn btn-danger remove">X</button></td>'
}

</script>

Please sign in or create an account to participate in this conversation.