Event Handlers
Web pages are active and interactive, files and images load in, the user can move between frames and windows, can enter text, can make selections and click on buttons. These events can be picked up by the system and used to start javscript code. These are called event handlers.
There are dozens of event handlers but these 6 are what you will be useing most often:
What ever the event handler, the code is attached in the same way ~ enclosed the code in "double quotes", assign it with an = sign and put the whole expression inside the tag that creates the object.
If the code you are using contains text (such as in an alert message), it will need to be enclosed in 'single quotes'. If you are going to be enclosing several javascript statements to one event each one will need to be seperated by a semi colon ; and the whole code enclosed in "double quotes" as usual.
onClick="checkEntry(); alert('Thank You')"