Home  >  Article  >  Web Front-end  >  怎么样验证密码是否一致_html/css_WEB-ITnose

怎么样验证密码是否一致_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:40:211943browse

现在做一个用户注册界面,密码跟确认密码怎么样做到一致验证啊!


回复讨论(解决方案)

你可以写段js,在表单提交时,获取两控件的值,然后将两值作比较,相等返回true,不相等弹出提示信息,返回false阻止表单提交。这是最基本的写法
其实网上有很多验证插件,基本常用的验证都有,你去下一个就行。

JS判断就行 如果你是做个人网站 或者不是很大的项目

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