示例代码如下:
<form><input> 用户名 </input><input> 密码 </input></form>
表单提交的时候,需要传递密码,但是在http网络环境下,该密码容易被嗅探到,所以想在form表单提交的时候,加密该密码。注意不能用ajax把提交的post请求独立出来;
能不能这样写:
$("#password").val = encrpt(password);
光阴似箭催人老,日月如移越少年。
The request package can be viewed at form 的 submit 事件中对该值进行处理打开开发人员工具的 Network
form
submit
Network
// jQuery 的话这么写 $("#password").val(encrpt(password))
This solution also has security issues, because the encrypt() encryption method needs to be loaded into the client, so the loading algorithm can be analyzed and the password can be reversely decrypted. It’s better to use https protocol
The request package can be viewed at
form
的submit
事件中对该值进行处理打开开发人员工具的
Network
This solution also has security issues, because the encrypt() encryption method needs to be loaded into the client, so the loading algorithm can be analyzed and the password can be reversely decrypted.
It’s better to use https protocol