52,797
社区成员
发帖
与我相关
我的任务
分享
var f =$('#form1');
f.form('submit', {
url : '${basePath}/manage/question/category/save.html',
success : function(d) {
var json = $.parseJSON(d);
if (json.success) {
alert("success");
}
}
});
我的个人网站:www.88cto.com
function saveProduct() {
//$('#fm').form('submit', {
// url: url,
// onSubmit: function () {
// return $(this).form('validate');
// },
// success: function (result) {
// var result = eval('(' + result + ')');
// if (result.errorMsg) {
// $.messager.show({
// title: 'Error',
// msg: result.errorMsg
// });
// } else {
// $('#dlg').dialog('close'); // close the dialog
// $('#dg').datagrid('reload'); // reload the user data
// }
// }
//});//《-IE9测试有问题,改为Jquery方式提交。
if ($('#fm').form("validate"))
{
$.post(url, $('#fm').serialize(), function (result) {
if (result.success == true) {
$('#dlg').dialog('close');
$('#dg').datagrid('reload');
}
else {
$.messager.show({
title: 'Error',
msg: result.message
});
}
});
}
}