php json parse error,Uncaught transport.js/parseResult() error: can't parse to JSON.

这段代码展示了如何在JavaScript中通过复选框选择和按钮点击触发订单拆分操作。当用户勾选复选框后,`check()`函数会收集选中的复选框值,并调用`listTable.remove()`方法进行确认对话框提示,如果用户确认,则通过Ajax发送请求到指定URL进行订单拆分。

复选框:

按钮:

function check()

{

var rec_id_Array = new Array();

$("[name='checkboxes']:checked").each(function () {

rec_id_Array.push($(this).val());

});

listTable.remove(rec_id_Array, '確定拆分訂單嗎', 'split_order');

}

listTable.remove = function(id, cfm, opt)

{

if (opt == null)

{

opt = "remove";

}

if (confirm(cfm))

{

var args = "act=" + opt + "&id=" + id + this.compileFilter();

Ajax.call(this.url, args, this.listCallback, "GET", "JSON");

}

}

回复内容:

复选框:

按钮:

function check()

{

var rec_id_Array = new Array();

$("[name='checkboxes']:checked").each(function () {

rec_id_Array.push($(this).val());

});

listTable.remove(rec_id_Array, '確定拆分訂單嗎', 'split_order');

}

listTable.remove = function(id, cfm, opt)

{

if (opt == null)

{

opt = "remove";

}

if (confirm(cfm))

{

var args = "act=" + opt + "&id=" + id + this.compileFilter();

Ajax.call(this.url, args, this.listCallback, "GET", "JSON");

}

}

本文原创发布php中文网,转载请注明出处,感谢您的尊重!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值