Event Attributes

Event Attributes fire an event when a particular action happens such as:
mouseclick, keypress, image-loaded, window-openened, frame-resize.
Here are the most commonly used ones.

  • Mouse Event Attributesfires when:
  • onclickelement is clicked on (up and down)
  • ondblclickelement is double clicked
  • onmouseovermouse enters an element or one of its children
  • onmouseoutmouse leaves an element or its children
  • onmousedownuser presses mouse down over element
  • onmouseupuser releases mouse over element
  • onmousemovemouse moves over element
  • Keyboard Event Attributesfires when:
  • onkeydownmouse moves over element
  • onkeypresskey is pressed down, does not work on all keys and elements
  • onkeyupkey is released
  • Event properties (keyboard and mouse)returns:
  • clientXx-coord relative to window
  • clientYy-coord relative to window
  • screenXx-coord relative to screen
  • screenYy-coord relative to screen
  • keyCodecode (number) for the key that has been entered
  • targetelement that triggered the event
  • typekind of event
  • timeStamptime of triggering event
  • Form Event Attributesfires when:
  • onfocuswhen element gets focus
  • onblurwhen element looses focus
  • onchangewhen element looses focus
  • <--! onresize onload -->

<-----Back        Next --->

This username already exists.

This username already exists.

Login or register to save your work.

User name field is empty.

Your username needs to be at least 7 characters long.

Your username can not contain any of the following characters: ",', <, > , < and whitespaces.

Please enter a correct email addresss .

This email address is not found in our database .

Your password needs to be at least 7 characters long.

forgot password