5 points
Javascript Events
Last update
Aug 13, 2009
| ID | Event | What it does? |
| 1. | onload | // Applied when a page has been loaded |
| 2. | onunload | // Applied when a page has been unloaded e.x. a link is pressed, the tab is closed |
| 3. | onresize | // Applied when the browser's size is changed |
| 4. | onerror | // Applied when an error occurs |
| 5. | onfocus | // Applied when an object gets focus e.x. a text form is pressed |
| 6. | onblur | // Applied when an object loses focus, reverse onfocus |
| 7. | onchange | // Applied when the content of a field is changed |
| 8. | onclick | // Applied when an object gets clicked |
| 9. | ondbclick | // Applied when an object gets double clicked |
| 10. | onkeypress | // Applied when a keyboard key is pressed or held down |
| 11. | onkeydown | // Applied when a keyboard key is pressed |
| 12. | onkeyup | // Applied when a keyboard key is released |
| 13. | onmousedown | // Applied when a mouse button is released |
| 14. | onmouseup | // Applied when a mouse button is clicked |
| 15. | onmouseover | // Applied when the mouse pointer moves over a specified object |
| 16. | onmouseout | // Applied when the mouse pointer moves away from a specified object |
| 17. | onmousemove | // Applied when the mouse pointer is moved |
| 18. | onselect | // Applied when text is selected in a text or textarea field or an option is selected |
| 19. | onsubmit | // Applied when the submit button in a form is clicked |
| 20. | onscroll | // Applied when the window is scrolled up or down |
| 21. | onbeforeunload | // Applied when the page is about to be unloaded |
| 21. | onerror | // Applied when an error occurs loading a document or an image |

login to vote
Very comprehensive, easy to view guide.
A+ Not sure why you have ="" after every event though, or //'s on the What it does? column.
login to vote
Cause you write in the "" and by // I mean comments
login to vote
I think it would be more relevant to userscripts if both the ="" and the
on-were removed as Greasemonkey prefers eventListeners I believe over event objects (does it not?).Then you could also add all the DOM prefixed ones like
DOMContentLoaded, DOMFrameContentLoaded, DOMFocusIn, etc. etc. etc.https://developer.mozilla.org/En/DOM_Events
login to vote
Well this isn't javascript, it's html. You don't need that stuff. Plus like lucideer said, you need to add the DOM events.
login to vote
You were probably right! I fixed it!
login to vote
A more complete list can be found at http://en.wikipedia.org/wiki/DOM_Events but this is nice for a quick reference.
login to vote
Fixed one part, that's good, but you still need to take the double slashes out and add a few common DOM events, maybe with a link to a full list.
login to vote
Can i ask? Are you from Greece? if yes me too :P Geia sou konstantine, Tha me ma8eis tpt? MSN: theofilaktos.spendas@windowslive.com