Home > Web Front-end > JS Tutorial > How to implement the input password into black dot cipher text

How to implement the input password into black dot cipher text

高洛峰
Release: 2017-01-10 09:35:12
Original
2796 people have browsed it

Input password encryption

html code

<form id="login-form" method="post" onsubmit="return checkForm()">
 输入密码<input type="password" id="input-password">
 <input type="hidden" id="md5-password" name="password">
 <button type="submit">Submit</button>
</form>
Copy after login

js code

function checkForm() {
 var input_pwd = document.getElementById(&#39;input-password&#39;);
 var md5_pwd = document.getElementById(&#39;md5-password&#39;);
 // 把用户输入的明文变为MD5:
 md5_pwd.value = toMD5(input_pwd.value);
 // 继续下一步:
 return true;
}
Copy after login

The above is the entire content of this article, I hope that the content of this article can be of some help to everyone's study or work, and I also hope to support the PHP Chinese website!

For more related articles on how to implement the input password into black dot ciphertext, please pay attention to the PHP Chinese website!

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