Home >Backend Development >PHP Tutorial > 求教容易的JS验证表单

求教容易的JS验证表单

WBOY
WBOYOriginal
2016-06-13 13:22:45905browse

求教简单的JS验证表单

上面的代码可以在客户端实现验证为空,但是为什么验证为空之后,网页还是指向form的action那个页面呢?也就是说表单还是提交了是吧?该怎么修改呢?修改成验证通过了在提交。谢谢各位了,我新手,问题很简单,望谅解。

------解决方案--------------------


这样写,删掉按钮的onclick 。
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn