html鎻愪氦鏁版嵁濡備綍鍔犲瘑
鍦╤tml涓娇鐢∕D5瀵规彁浜ゆ暟鎹繘琛屽姞瀵?/p>
html浠g爜濡備笅锛?/p>
<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);
//杩涜涓嬩竴姝?/p>
return ture;
}
</script>
相关问答