easyui form submit 不提交

http://bbs.csdn.net/topics/390811964
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
                        });
                    }                   
                });
            }
        }
上一篇:Android在初始化时弹出popwindow的方法


下一篇:GitHub 优秀的项目地址