Client-side scripting is that set of scripts that runs on the clients computer (rather than on the web server). For security reasons, most client-side scripting languages are designed to be unable to write to files and can only interact with the clients file system on a very rudimentary basis (generally only able to read from cookies and .js files). However, as they run on the local machine, they generally are not hit with any major request-response lag time and so are generally much faster than server-side script. So next question: what do we use them for?
- onLoad - when the page/element finishes loading
- onunLoad - when the page is being left (when we are moving to another page)
- onClick - when an element is left-clicked on
- onDblClick - when an element is double clicked on
- onkeyPress - when a keyboard key is pressed (in relation to a particular element)