使用$.post()方法购买商品:成功与失败处理
{ // 使用$.post()方法提交购买请求 $.post('goods_buy', {goodsid:goodid}, function(data) { // 服务器返回数据处理 if (data === 'ok') { // 成功代码 alert('Purchase successful!'); } else { // 失败代码 alert('Purchase failed!'); } });
原文地址: https://www.cveoy.top/t/topic/oKxK 著作权归作者所有。请勿转载和采集!