溫馨提示×

html提交數據如何加密

九三
616
2021-02-09 09:16:00
欄目: 編程語言

html提交數據如何加密

在html中使用MD5對提交數據進行加密

html代碼如下:

<form id='test_form' action='' method='' omsubmit='return checkForm()'>

    <input type='text' name='username' value=''/>

    <input type='password'  id='input_pwd' value =''/>

    <input type='hidden' name='pwd' id='md5_pwd' value=''/>

    <button type='submit'>提交</button>

</form>

 

<script>

function checkForm(){

    var input_pwd= document.getElementById('input_pwd');

    var md5_pwd= document.getElementById('md5_pwd');

     md5_pwd.value= toMD5(input_pwd.value);           

    //進行下一步

    return ture;

}

</script>


0
亚洲午夜精品一区二区_中文无码日韩欧免_久久香蕉精品视频_欧美主播一区二区三区美女