登陆界面的js有关问题

WBOY
Release: 2016-06-13 12:39:52
Original
928 people have browsed it

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

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

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

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

我使用了onsubmit,

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


但是不知道怎么做?

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