我希望能够让特定用户严格访问我的网页,而不是通过 IP;但通过 Javascript 和 HTML。
获取安全字符串有多容易?
function fc4me(srvstr) {
if(!document.pleazfc4me.email.value || !document.pleazfc4me.securitystring.value) {
alert("Please fill in all the required fields!");
return false;
}
if(document.pleazfc4me.securitystring.value != hexMD5("\x73\x73"+srvstr)) {
alert("Registration Authorization String not accepted! Try Harder! ");
return false;
} else {
document.pleazfc4me.submit();
}
}
和另一页?
Security String<font color="orange">*</font>:
<input type="text" name="securitystring" size="35">
<input onClick="var srvstr='foo';fc4me(srvstr);document.pleazfc4me.securitystring.value='';return false;" name="submit" type="image" src="images/button-submit.png" />