JavaScript

Introduction

First example: ex1 and notes (simple alert)

Second example: ex2 and notes (prompt and alert)

Third example: ex3 and notes(prompt and document.write)

Fourth example: ex4 and notes (prompt and document.bgColor)

beware of typos! (typo in ex4)


Event-driven programming


Onto forms...


ex5 and notes (simple form with one button)
ex5a (similar example with two buttons)

ex6 and notes (using buttons to set background color)

ex7 and notes (using input box instead of prompt)

ex8 and notes (using input boxes and document.write to design a custom web page)

ex9 and notes (uses a function)

ex10 (calculator, answer given in alert)

ex10a (calculator example without using parseFloat, doesn't add properly)

ex10b (calculator example with answer appearing in a text box)


ex11 (simple pay calculation)

ex11a (pay calculation with check for overtime)

ex11b (pay calculation with check f fulltime or parttime)

ex11c (pay calculation with different rates used for fulltime or parttime)


rollover changing the status bar

rollover changing the color

rollover changing image example 1

rollover changing image example 2

rollover doing lots of stuff


More Animations and Games