我知道 Firebug Json 在成功后会生成一条消息:函数但找不到如何显示它......所以我尝试添加这个:
if(data.status == 'ERROR'){
jQuery("#ajax_message").html("product out of stock.").hide().fadeIn().delay(10000).fadeOut();
}else{if(data.status == 'SUCCESS'){
jQuery("#ajax_message").html("product added.").hide().fadeIn().delay(10000).fadeOut();
}
但是添加产品后什么都没有发现。
任何想法?