With the following short script directly written into the body of a
html page you get an short output of the program directly into the page
the ouput would be
The browser executes the write command immediatly during load as it
interprets all the html command from top to bottom as well.
When the program becomes more difficult you will probably seperate in
functions and methods to run them at different events and not only everything once during load.
This defined function can now be called at other times like on click on a button to fill something into a text box.
what is programmed then like
<input type="button" onclick="say_hello()" value="click to say hello">
or by click on a link to
so the code looks like
Originally I demonstarted that with a pop up window, but did you know that WebTVs are not able to see them?