Hi,
I am making an very basic interactive webpage.
I have created a prompt box and wish to add a verification to this with an alert attached so that if the enter the right word a popup appears saying so and also if they don't but it won't work.
I get the prompt to enter the text but no alert.
Can anyone help me thank you.
HTML:
Code:
<a onclick="yellow3()">Click here bro</a>
Javascript
:
Code:
function yellow3()
{
var name=prompt("Please enter the colour yellow", "Colour");
if(name==yellow || name==Yellow || name==YELLOW)
{
alert("You have correctly entered yellow");
}
else
{
alert("You have incorrectly entered yellow");
}
}