728x90

목동코딩,코딩교육

function deleteOerder(obj) {

   $("#" + obj.id).closest('tr').remove();
}

var row = "";
row = row + "<tr>";

row = row +
    "<td><input id='" + resArray[0] +
    "' name='ItemCode' class='btn btn-secondary' onclick='deleteOerder(this);' type='button' value='" +
    '삭제' +
    "' style='width: 80%;padding: 0;border-radius: 0.4rem;font-size: 1.45rem;border-color: white;'></td>";
row = row +
    "<td ><input name='DispLetter'  type='text' value='" + resArray[1] +
    "' style='width: 100%;' disabled></td>";
row = row + "<td ><input name='ItemName'  type='text' value='" + resArray[2] +
    "' style='width: 100%;' disabled></td>";
row = row + "<td ><input name='Price'  type='text' value='" + comma(resArray[3]) +
    "' style='width: 100%;text-align:right;padding-right:10px;' disabled></td>";
row = row +
    "<td ><input   name='Cnt' onchange='reCalcu();'  type='number' value='1' min='1' style='width: 100%;' ></td>";

row = row + "</tr>";
$('#orderItems').append(row);
var totSum1 = uncomma($('#buySum').val());
var totSum2 = uncomma(resArray[3]);
var totSum = (parseInt(totSum2) + parseInt(totSum1)).toString();

$('#buySum').val(comma(totSum));
          
});
728x90

+ Recent posts