Home >Database >Mysql Tutorial >在项目中,判断密码框中密码是否被修改的小技巧!

在项目中,判断密码框中密码是否被修改的小技巧!

WBOY
WBOYOriginal
2016-06-07 15:05:311654browse

通过js实现:部分代码如下: var password = document.getElementById(logonPwd).value; var defaultPassword = document.getElementById(logonPwd).defaultValue; 可以通过比较password == defaultPassword(刚加载页面时,密码框中的 )来进行判断密码框中

通过js实现:部分代码如下:

var password = document.getElementById("logonPwd").value;

var defaultPassword = document.getElementById("logonPwd").defaultValue;

可以通过比较password == defaultPassword(刚加载页面时,密码框中的值)来进行判断密码框中的密码是否被修改过。

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