Page Script Examples

When you click on the button two things will happen:

  1. 4 scripts are added to the page. The 1st defines a function called Script1. The 2nd immediately executes the built-in alert function. The 3rd is an external script library which defines a function called Script3. The the 4th immediately executes Script3.
  2. A new button will be added to the page. When you click on the new button it will execute the Script1 function.

Before you click the button, none of the javascript functions are part of the page (go ahead and check the page source).