Phần HTML
Câu hỏi: Khi sự kiện $(".num_order") thay đổi thì mình muốn lấy giá trị ‘price’ của chính ‘num_order’ thay đổi đó(mình nghĩ phài dùng this để trỏ ra ngoài để lấy) , nhưng mình làm mãi vẫn ko được, ai giúp mình với ạ, mình cảm ơn ạ
$(document).ready(function () {
$(".num-order").change(function () {
var price = ;
var num_order = $(this).val();
console.log(price);
$.ajax({
url :'?mod=cart&act=update',
method: 'POST',
data:{num_order:num_order, price:price},
dataType:'text',
success: function(data){
// $(".sub-total").html(data+"đ");
},
});
});
});