내 페이지의 모든 내용이 완벽하게 작동합니다. 경고 (userinput.value); 완벽하게 작동하지만 문장은 버튼을 호출하지 않습니다. 이 코드는 else 문에서 유효한 명령 만 반환합니다.If-else 문이 작동하지 않습니다. JavaScript의 사례를 무시하고 싶습니다.
function btn_go_click(){
var userinput = document.getElementById("txtcommand");
alert(userinput.value);
if (userinput.value === ("N" || "North")){
btn_North_click();
}else if (userinput.value === ("E" || "East")){
btn_East_click();
}else if (userinput.value === ("S" || "South")){
btn_South_click();
}else if (userinput.value === ("W" || "West")){
btn_West_click();
}else{
UpdateText ("Valid commands are \"n\", \"e\", \"s\", \"w\"");
}
}