复选框:
按钮:
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中文网,转载请注明出处,感谢您的尊重!
这段代码展示了如何在JavaScript中通过复选框选择和按钮点击触发订单拆分操作。当用户勾选复选框后,`check()`函数会收集选中的复选框值,并调用`listTable.remove()`方法进行确认对话框提示,如果用户确认,则通过Ajax发送请求到指定URL进行订单拆分。

被折叠的 条评论
为什么被折叠?



