因此,这是为了进行安全登录。我通过 chrome 的 javascript 控制台运行它,我得到'未捕获的 ReferenceError: Invalid left-hand side in assignment'?!请帮忙!
function logIn() {
String.prototype.hashCode = function() {
for(var ret = 0, i = 0, len = this.length; i < len; i++) {
ret = (31 * ret + this.charCodeAt(i)) << 0;
}
return ret;
};
var user = document.getElementById("username"),
pass = document.getElementById("password");
if ((user = "Fedora") && (pass.hashCode() = -976887139)) {
window.alert("Captain Fedora: SuperUser");
}
}