我尝试制作销售点时出错
未捕获的ReferenceError:分配中的左侧无效
这是我的代码
$.ajax({
url: "proses.php",
data: "op=simpanpembelian&idpembelian=" + idpembelian + "&idbarangpembelian=" + idbarangpembelian + "&tgl=" + tgl + "&namabarangpembelian=" + namabarangpembelian + "&kemasan=" + kemasan + "&jumlah=" + jumlah + "&harga=" + harga + "&isi=" + isi = "&total=" + total,
cache: false,
success: function (msg) {
if (msg == "sukses") {
$("#status").html("Data berhasil disimpan. . .");
} else {
$("#status").html("Error");
}
$("#loading").hide();
$("#tgl").val("");
$("#idpembelian").val("");
$("#idbarangpembelian").val("");
$("#namabarangpembelian").val("");
$("#kemasan").val("");
$("#jumlah").val("");
$("#harga").val("");
$("#isi").val("");
$("#total").val("");
$("#pembelian").load("proses.php", "op=pembelian");
}
});
答案 0 :(得分:1)
错字:
"&isi=" + isi = "
=
应为+
harga + "&isi=" + isi + "&total=" + total,