var passwordText = document.getElementById("id").value; if(passwordText == "hello300") { return true; } else { alert("Not correct") return false }