Please refer to the code below.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Basic TextBox - jQuery EasyUI Demo</title>
<link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/icon.css">
<script type="text/javascript" src="https://www.jeasyui.com/easyui/jquery.min.js"></script>
<script type="text/javascript" src="https://www.jeasyui.com/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript">
var counter = 0;
function addRow() {
var tr = $('<tr></tr>').appendTo('.order-list');
var td = $('<td></td>').appendTo(tr);
$('<input>').attr('name', 'func' + counter).appendTo(td).combobox({
data: [{ value: 'Add', text: 'Add', selected: true }, { value: 'Remove', text: 'Remove' }],
editable: false
});
td = $('<td></td>').appendTo(tr);
$('<input>').attr('name','name'+counter).appendTo(td).textbox({
onChange: function(value){
console.log('changed:'+value);
}
});
td = $('<td></td>').appendTo(tr);
$('<input>').attr('name','qty'+counter).appendTo(td).textbox({
onChange: function(value){
console.log('changed:'+value);
}
});
$('<td><input type="button" id="ibtnDel" value="Delete"></td>').appendTo(tr);
counter++;
if (counter>=10){
$('#addrow').attr('disabled',true);
}
}
$(function () {
$("#addrow").on("click", function () {
addRow();
});
$("table.order-list").on("click", "#ibtnDel", function (event) {
var tr = $(this).closest("tr");
tr.find('.combobox-f').combobox('destroy');
tr.remove();
counter--;
if (counter < 10) $('#addrow').attr("disabled", false).prop('value', "Add Row");
});
})
</script>
</head>
<body>
<table id="myTable"></table>
<table class="order-list"></table>
<button id="addrow">Add Row</button>
</body>
</html>