Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

注册页面中在前后台加入对输入信息的判断 #11

Open
ct1tc opened this issue Apr 9, 2018 · 1 comment
Open

注册页面中在前后台加入对输入信息的判断 #11

ct1tc opened this issue Apr 9, 2018 · 1 comment

Comments

@ct1tc
Copy link

ct1tc commented Apr 9, 2018

在点击注册按钮触发事件的时候,获取到各个信息输入框中的值并一一判断是否为空,每次判断一个值的时候在标题下方添加一个显示div,在里面用jquery选中并填入错误原因,并且每次提交时需要将之前显示的错误先重新赋值为空进行清空。并且利用onfocus事件获取焦点。后台部分:由于已经获取到了传入的各个参数,所以用if判断后返回状态值5来表示填写信息不完善,在前台获取5的时候进行弹框提示。

@zhangjinxin1227
Copy link

输入用户名 不大于十个长度 maxlength="10"
判断用户密码两次输入是否相同: 判断两个输入的内容是否相同,
正则表达式判断输入的手机号格式是否正确:
var reg = /^1[3|4|5|7|8][0-9]{9}$/;
正则表达式判断输入的邮箱格式是否正确:
var reg= /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants