<script type="text/javascript"> //Delete event handler. $("body").on("click", "#WebGrid TBODY .Delete", function () { if (confirm("Do you want to delete this row?")) { var row = $(this).closest("tr"); var customerId = row.find(".label").html(); $.ajax({ type: "POST", url: "/Home/DeleteCustomer", data: '{customerId: ' + customerId + '}', contentType: "application/json; charset=utf-8", dataType: "json", success: function (response) { if ($("#WebGrid TBODY tr").length == 1) { row.find(".label").html(""); row.find(".text").val(""); row.find(".link").hide(); } else { row.remove(); } } }); } }); </script>
Cùng nhau học tập, khám phá các kiến thức nền tảng về Lập trình web, mobile, database nhé.
Nền tảng kiến thức - Hành trang tới tương lai hân hạnh phục vụ Quý khách!
Khám phá, trải nghiệm ngay
Vui lòng đăng nhập để gởi bình luận!
Đăng nhậpChưa có bình luận nào!