标签:io ar os for sp div on cti bs
form内控件参数自动添加到url后,而自定义的url参数则不能添加到url后
$(‘#fm‘).form(‘submit‘, {
url: ‘Data/Diary.ashx?dt=‘ + new Date() + ‘&operation=save‘, operation参数在后台无法得到,换一种提交方式
onSubmit: function () {
return $(this).form(‘validate‘);
},
success: function (result) {
$.messager.alert("提示信息", result.msg);
closeDiary();
$(‘#divDatagrid‘).datagrid(‘reload‘);
}
});
换一种提交方式
$.ajax({
url: ‘Data/Diary.ashx‘,
Type: ‘POST‘,
dataType: ‘json‘,
data: { dt: new Date(), operation: "save", title: $(‘#title‘).val(), content: $(‘#content‘).val(), id: $(‘#hidDiaryId‘).val() },
success: function (result) {
if (result.isok) {
$.messager.alert("提示信息", result.msg);
closeDiary();
$(‘#divDatagrid‘).datagrid(‘reload‘);
} else {
$.messager.alert("提示信息",result.msg);
}
}
});
标签:io ar os for sp div on cti bs
原文地址:http://www.cnblogs.com/miraclesakura/p/4071750.html