jquery easyui from 提交动作报错 在线等高手解答
UncaughtTypeError:Object#<HTMLUnknownElement>hasnomethod'submit'<fromid="drgmst"metho...
Uncaught TypeError: Object #<HTMLUnknownElement> has no method 'submit'
<from id="drgmst" method="post">
......
<a href="javascript:void(0);" class="easyui-linkbutton" onclick="saveDrg()">保存</a>
</from>
function saveDrg(){
$('#ff).form('submit', {
url:url,
onSubmit: function(){
var name = $("#name").val();
var code = $("#code").val();
var py = $("#py").val();
if(code == null || code == ""){
$.messager.alert("提示","xxx!","info",function(){
$("#code").focus();
});
return false;
}
if(name == null || name == ""){
$.messager.alert("提示","xxx!","info",function(){
$("#name").focus();
});
return false;
}
if(py == null || py == ""){
$.messager.alert("提示","xxx!","info",function(){
$("#py").focus();
});
return false;
}
},
success:function(data){
alert(data);
}
})
} 展开
<from id="drgmst" method="post">
......
<a href="javascript:void(0);" class="easyui-linkbutton" onclick="saveDrg()">保存</a>
</from>
function saveDrg(){
$('#ff).form('submit', {
url:url,
onSubmit: function(){
var name = $("#name").val();
var code = $("#code").val();
var py = $("#py").val();
if(code == null || code == ""){
$.messager.alert("提示","xxx!","info",function(){
$("#code").focus();
});
return false;
}
if(name == null || name == ""){
$.messager.alert("提示","xxx!","info",function(){
$("#name").focus();
});
return false;
}
if(py == null || py == ""){
$.messager.alert("提示","xxx!","info",function(){
$("#py").focus();
});
return false;
}
},
success:function(data){
alert(data);
}
})
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询