介绍
这篇文章将为大家详细讲解有关JS表单提交信息加密的示例,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。
提交表单
& lt; ! DOCTYPE html> & lt; html lang=癳n"祝辞& lt; head> ,,,& lt; meta charset=癠TF-8"比; ,,,& lt; title> Title ,,,& lt; https://www.yisu.com/zixun/script src=" md5.js "> 脚本> 头> <身体> <形式action=" # "方法=" post ">用户名:
密码:
<按钮类型=" submit " onclick=" aaa ()>提交按钮> 形式> <脚本> 函数aaa () { var usern=. getelementbyid(“用户名”); var pwd=. getelementbyid (pwd); console.log (usern) console.log (pwd) pwd.value=md5 (pwd.value); console.log (pwd.value); }脚本> 身体>