js24
Java Script in 24 Hours - Hour 3:






pg.38 STATEMENTS/FUNCTIONS - function with function call

HTML code =

JavaScript code =

result =



pg.38 STATEMENTS/FUNCTIONS - function call prompts user for a response and stores it in a text variable

HTML code =

JavaScript code =

result = box opens on page load



pg.39 VARIABLES - following Statement creates a Variable called "fred" and assigns it the value 27

HTML code =

JavaScript code =

result =






listing 3.1 pg.45 - this event handler is defined with the onClick attribute and uses the built-in alert() function to display a message

HTML code =

JavaScript code =

result = Click here to test and event handler.

HTML file "JS in 24 hours" - listing 3.1