为什么无法触发 .updateById alert()都没有弹出来
在js文件里
<button type='button' class='btn btn-danger btn-xs updateById'>未上架</button>
function updateById() {
alert('sdfsdfs');
$(".updateById").on("click",function() {
var ALIAE_CODE = $(this).parent().parent().find("td:eq(0)").text().trim(); //获取id
if (confirm('确认报价吗?')) {
$.ajax({
url : 'salesSlowMovingStock/updateShelvesById.do',
type : 'POST',
dataType : 'json',
data : {ALIAE_CODE : ALIAE_CODE},
success : function(data) {
if (data = 1) {
//firstLoadData("/distributionQuote/getdistributionQuotePage.do?"+ mySelectForm,$(".laypage_curr").text()); // 指定url
} else {
alert("添加失败");
}
}
});
} else {
return false;
}
});
}