ruby2015
ruby2015
  • 发布:2015-10-31 17:00
  • 更新:2015-10-31 17:00
  • 阅读:1710

在一个页面提交表单,却自动调用了另一个页面的js

分类:MUI

我真机测试,在reg.html中提交表单,代码是这样的:
<form method="post" id="regForm" action="http://192.168.1.133:3000/reg" onsubmit="return chkForm2();">

然后我在该页面的chkForm2中用html+的函数提交表单,然而控制台却爆出这样的错误是在让人费解

event.returnValue is deprecated. Please use the standard event.preventDefault() instead.
Uncaught ReferenceError: chkForm2 is not defined at login.html:1

chkForm2这个函数明明写在reg.html怎么说不在login.html中呢?

然后我在login.html中提交表单,代码是
<form method="post" id="loginForm" action="http://192.168.1.133:3000/reg" onsubmit="event.preventDefault(); chkForm()">

程序报错: Uncaught ReferenceError: chkForm is not defined at index.html:1,错误又到index.html中了

补充一下,我页面是用jquerymobile做的,在网页上测试没有问题,页面跳转顺序为index.html-login.html-reg.html.

为了方便各位大神指导,我把代码传上来吧。

2015-10-31 17:00 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复