TypeError: $(...).form is not a function
<scripttype="text/javascript">functionfindHotel(path){alert(path);$('#myForm').form('...
<script type="text/javascript">
function findHotel(path){
alert(path);
$('#myForm').form('submit', {
url : path+'/mobile/user/getHotelOrderByUserId',
onSubmit : function() {
return $('#myForm').form('validate');
},
success : function(data) {
alert(data);
}
});
}
function loadValue(){
var paramJsons = "{\"userId\":\"M805400001\",\"currentResult\":\"0\"}";
$('#paramJson').val(paramJsons);
}
</script>
</head>
<body onload="loadValue();">
<form method="post" id="myForm" >
<input value='111' type="text"><br />
<input id="paramJson" type="text" style="width: 500px;"><br />
<input type="button" value="查询酒店订单" onclick="findHotel('<%=path%>');" >
</form>
</body>
</html>
出现 :ERROR TypeError: $(...).form is not a function 展开
function findHotel(path){
alert(path);
$('#myForm').form('submit', {
url : path+'/mobile/user/getHotelOrderByUserId',
onSubmit : function() {
return $('#myForm').form('validate');
},
success : function(data) {
alert(data);
}
});
}
function loadValue(){
var paramJsons = "{\"userId\":\"M805400001\",\"currentResult\":\"0\"}";
$('#paramJson').val(paramJsons);
}
</script>
</head>
<body onload="loadValue();">
<form method="post" id="myForm" >
<input value='111' type="text"><br />
<input id="paramJson" type="text" style="width: 500px;"><br />
<input type="button" value="查询酒店订单" onclick="findHotel('<%=path%>');" >
</form>
</body>
</html>
出现 :ERROR TypeError: $(...).form is not a function 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询