所以這是我有的代碼,當點擊我的導航欄中的一個頁面時會提示這個代碼,提示框確實出現並要求輸入,但無論我輸入什麼都不會發生:提示不起作用
function AlertFunction() {
var person = prompt("Please Enter Password to enter Private Chat");
if (person === Python) {
window.location.pathname = 'index.1.html';
} else {
alert("Sorry you do not have access to this page");
}
}
我會在這裏把網站,並儘量保持它的在線方式,您可以查看頁面,如果你想:https://project-js-imthatguy.c9users.io/index.html
按F12(在windows上)打開調試控制檯。我猜它會說'Python'是錯誤的,應該是'「巨蟒」'加上引號 – Martijn