thinkPHP的Ajax问题,为什么我会找不到我的Form的ID
<scripttype="text/javascript"> functionshow(){ Thin...
<script type="text/javascript">
function show(){
ThinkAjax.sendForm('frm','__URL__/getID',wc);
}
function wc(data,status){
if(status!=1){
console.log('发送失败');
}else{
console.log(data.questionID);
}
}
</script>
<script type="text/javascript" src="__PUBLIC__/Js/ThinkAjax.js"></script>
这是form代码
<form action="" method="POST" id="frm" name="frm">
<button type="button" data-toggle="modal" data-target="#editques" class="templatemo-blue-button editfold" onClick="show()">修改
</button>
</form>
提交的时候提示两个问题
Uncaught ReferenceError: Form is not defined
Uncaught TypeError: Cannot read property 'find' of undefined 展开
function show(){
ThinkAjax.sendForm('frm','__URL__/getID',wc);
}
function wc(data,status){
if(status!=1){
console.log('发送失败');
}else{
console.log(data.questionID);
}
}
</script>
<script type="text/javascript" src="__PUBLIC__/Js/ThinkAjax.js"></script>
这是form代码
<form action="" method="POST" id="frm" name="frm">
<button type="button" data-toggle="modal" data-target="#editques" class="templatemo-blue-button editfold" onClick="show()">修改
</button>
</form>
提交的时候提示两个问题
Uncaught ReferenceError: Form is not defined
Uncaught TypeError: Cannot read property 'find' of undefined 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询