|
Webteacher Software now offers
if(Ret=="castle") { location = 'ch03_1.html';} else { alert("Please try again")}
The if-then statement The second line of the function is an if-then statement. It tells the computer that if the variable Ret equals "castle" then change the URL location to ch03_1.html. Otherwise, show the alert box which says "Please try again."
Here is the format of an if-then statement:
For example, let's say you've just had the reader complete a form which included their age. You want all Senior Citizens to get one message, and everyone else to get another when they submit the form.
| ||||||||||||
Home | WebData - Web Database Software | Javascript | CGI | Consulting | Map Builder | Contact Us | The Press Room |