Build a website with javascript games and other dynamic content

Step One - Simple Javascript

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.


function say_hello()





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 Say Hello so the code looks like

<a href="javascript:say_hello()"> Say Hello</a>

Originally I demonstarted that with a pop up window, but did you know that WebTVs are not able to see them?

Next step



My Games

Get Games

Build Games
1 - simple javascripts
2 - change form values
3 - statusbar & mouse
4 - change images
5 - preload images
6 - change location
7 - open/close windows
8 - other sources

Feedback or Questions

about me


Copyright by Armin Kielack 1998 last modified: