这是我的HTML
<div class="top-item-grid-body" id="item-grid-${entry.entryNumber}"></div>这是我的Ajax
$.ajax({
type:'GET',
data:"",
url: 'cart/delete?cartEntryNumber='+entryNbr,
success: function(){
$("#item-grid-"+entryNbr).remove();
}
})我必须显示一条消息,告诉我“您的购物车是空的”,当所有的项目都是removed..How时,我要在Ajax成功函数中这样做吗?
发布于 2015-07-27 17:36:20
这就是你要找的东西吗?
$.ajax({
type:'GET',
data:"",
url: 'cart/delete?cartEntryNumber='+entryNbr,
success: function(){
$("#item-grid-"+entryNbr).remove();
alert("Your cart is empty");
}
})https://stackoverflow.com/questions/31649310
复制相似问题