Home  >  Article  >  Backend Development  >  登陆界面的js有关问题

登陆界面的js有关问题

WBOY
WBOYOriginal
2016-06-13 12:39:52900browse

登陆界面的js问题?
后台登陆系统,如果表单填写的不合js要求,js提示错误,如果正确,跳转到php登陆数据验证,

结果我做了一个表单,什么都不填,js肯定要提示错误,但是马上直接跳转到php页面去了。

我就是不知道如何在js验证都没通过的情况下,阻止form的action提交?

----------------------------

我使用了onsubmit,

<form class="form-horizontal" action="{:U('checkuser')}" method="post" onsubmit="return check()">


但是不知道怎么做?

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