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

求教容易的JS验证表单

WBOY
Release: 2016-06-13 10:34:22
Original
917 people have browsed it

求教简单的JS验证表单

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

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


这样写,删掉按钮的onclick 。
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template