Tak, mam kod, nie jest zrobiony, ale wszystko, co chcę zrobić, to wyświetlenie jednego pola alertu, jeśli napiszę słowo "pomoc", i powiedz coś innego, jeśli cokolwiek innego zostanie wprowadzone .jeśli instrukcja w javascript zawsze jest prawdziwa
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")
}
};
, ale co się dzieje, nie ważne co, pojawi się pierwsze okno alertu, nawet jeśli naciśniesz przycisk anuluj! Jak to naprawić?
Założę się, że tak się dzieje z wieloma osobami ... świetne pytanie, nigdy wcześniej tego nie widziałem! – Purag