所以,我有代码,它没有完成,但我希望它做的是显示一个警告框,如果我写'帮助'这个词,并说别的东西,如果还有其他东西输入。如果在JavaScript语句总是为真
function prompter() {
var reply = prompt("This script is made to help you learn about new bands, to view more info, type help, otherwise, just click OK")
if (reply === 'help' || 'Help')
{
alert("This script helps you find new bands. It was originally written in Python 3.0.1, using Komodo IDE, but was then manually translated into Javascript. Please answer the questions honestly. If you have no opinion on a question, merely press OK without typing anything.")
}
else
{
alert("Press OK to continue")
}
};
但是,发生了什么,是无论什么时候,第一个警告框弹出,即使按取消! 我应该如何解决这个问题?
我敢打赌,这发生在很多人身上......伟大的问题,我从来没有见过这里在这里! – Purag 2012-02-15 23:30:12