我想在一些文本框条目中运行JavaScript用户验证。
我的问题是,我的表单具有在我们网站内转到新页面的操作,并且onsubmit
属性从未运行JavaScript函数。
是否有更好的解决方案或可以与以下代码一起使用的方案:注意:如果将操作切换到checkRegistration()
,则JavaScript文件已正确编写并正常工作。
这只是同时运行操作和JavaScript的问题。
<form name="registerForm" action="validate.html" onsubmit="checkRegistration()" method="post">
<!-- Textboxes are here -->
<!-- And the submit button -->
</form>
checkRegistration
吗? - Arun P Johny