javascript if statements
DESCRIPTION
if statements for jsTRANSCRIPT
-
If Statements: if.html !!
Learning Javascript
What is the weather?
Submit
document.getElementById("myButton").onclick=function() {
-
if (document.getElementById("weather").value=="rain") {
alert ("it's raining");
} else {
alert("it's not raining!");
}
}