easyui 执行新增操作jsp页面报错

后端使用SpringMVC,前端执行新增操作出问题:
TypeError: $.fn.form.methods[_3de] is not a function
图片说明

js代码如下:
function saveAdd(){
$.messager.confirm('提示', '您确认要提交吗?', function(r) {
if (!r) {
return;
}
$('#wangdianAddForm').form('submit', {
onSubmit : function() {
return $(this).form('enableValidation').form('validate');
}
});

     var gsmc = $("#gsmc").textbox("getValue");
     var xsddm = $("#xsddm").textbox("getValue");
     var xsdmc = $("#xsdmc").textbox("getValue");
     var wdmc = $("#wdmc").textbox("getValue");
     var wdno = $ ("#wdno").textbox("getValue");
     var wdlx = $("#wdlx").textbox("getValue");
     var wdlb = $("#wdlb").textbox("getValue");
     var qydm = $("#qydm").textbox("getValue");
     var qy = $("#qy").textbox("getValue");
     var sfen = $ ("#sfen").textbox("getValue");
     var cshi = $("#cshi").textbox("getValue");
     var xian = $("#xian").textbox("getValue");
     var xzhen = $ ("#xzhen").textbox("getValue");
     var dizhi = $ ("#dizhi").textbox("getValue");
     var zmdbh = $ ("#zmdbh").textbox("getValue");
     var dmxz = $ ("#dmxz").textbox("getValue");
     var zmdgm = $("#zmdgm").textbox("getValue");
     var zspl = $("#zspl").textbox("getValue");
     var jdsj = $("#jdsj").datebox("getValue");
     var qczx = $("#qczx").datebox("getValue");
     var zxzx = $("#zxzx").datebox("getValue");
     var yb  = $("#yb").textbox("getValue");
     var sccj = $("#sccj").textbox("getValue");
     var xsgsfy = $("#xsgsfy").textbox("getValue");
     var jsxfy =$("#jsxfy").textbox("getValue");
     var fzren = $("#fzren").textbox("getValue");
     var bgdh = $("#bgdh").textbox("getValue");
     var fzrmobile = $("#fzrmobile").textbox("getValue");
     var zxfg = $("#zxfg").textbox("getValue");
     var gznr = $("#gznr").textbox("getValue");
     var xsry = $ ("#xsry").textbox("getValue");
     var shry = $("#shry").textbox("getValue");
     var qtry = $("#qtry").textbox("getValue");
     var dmmj = $("#dmmj").textbox("getValue");
     var bgmj = $ ("#bgmj").textbox("getValue");
     var ckmj = $("#ckmj").textbox("getValue");
     var sq = $ ("#sq").textbox("getValue");
     var zblj = $("#zblj").textbox("getValue");

     var czren = $("#czren").textbox("getValue");
     var czrmc = $ ("czrmc").textbox("getValue");

     var zjczren = $("#zjczren").textbox("getValue");
     var zjczrmc = $("#zjczrmc").textbox("getValue");


   var wangdian = {

       "gsmc":gsmc,
       "xsddm":xsddm,
       "xsdmc":xsdmc,
       "wdmc":wdmc,
       "wdno":wdno,
       "wdlx": wdlx,
       "wdlb": wdlb,
       "qydm": qydm,
       "qy": qy,
       "sfen": sfen,
       "cshi":cshi,
       "xian":xian,
       "xzhen":xzhen,
       "dizhi":dizhi,
       "zmdbh":zmdbh,
       "dmxz": dmxz,
       "zmdgm": zmdgm,
       "zspl":zspl,
       "jdsj":jdsj,
       "qczx":qczx,
       "zxzx":zxzx,
       "yb":yb,
       "sccj":sccj,
       "xsgsfy":xsgsfy,
       "jxsfy":jxsfy,
       "fzren":fzren,
       "bgdh":bgdh,
       "fzrmobile":fzrmobile,
       "zxfg":zxfg,
       "gznr":gznr,
       "xsry":xsry,
       "shry":shry,
       "qtry":qtry,
       "dmmj":dmmj,
       "bgmj":bgmj,
       "ckmj":ckmj,
       "sq":sq,
       "zblj":zblj,

       "czren":czren,
       "czrmc":czrmc,

       "zjczren": zjczren,
       "zjczrmc":zjczrmc,

   };
    $.ajax({
        type : "POST",
        url : "wangdianadd.do",
        data : wangdian,
        dataType : "json",
        success : function(data) {
            if (1 == data.result) {
                $.messager.alert("操作提示", data.msg, 'info');
                $("#dlg").dialog('close');
                $("#wangdianAdd_dg").datagrid("reload");

            } else {
                $.messager.alert("操作提示", data.msg, 'info');
            }
        },
        error : function(XMLHttpRequest, textStatus, errorThrown) {
            $.messager.alert("操作提示", XMLHttpRequest.status + ":"
                    + XMLHttpRequest.responseText, 'info');
        }
    });
});

}
是Jquery.js的问题还是我的代码的问题。

1个回答

表单wangdianAddForm的html有错(method属性),但你没有把相关的html贴出来。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问