HTML DOM Event Object Examples JavaScript (JS)

Get 5 Hours of FREE PREMIUM Videos:

LearnVisualStudio.NET Free Preview


LearnVisualStudio.NET Free Preview: Declaring Variables and Assigning Values

I am a lifetime member of LearnVisualStudio.net and a Premium Plus member of dotNetVideos.net.

LearnVisualStudio.net is awesome because it grows in value each year as more videos are added.

dotNetVideos.net is also great because it focuses a lot on MS Certifications and practical interview questions.


- Wade Harvey (IdealProgrammer.com)

LearnVisualStudio Premium Videos

Visual C# 2010 for Absolute Beginners C# for Absolute Beginners C# for Absolute Beginners Study Guide Visual Basic for Absolute Beginners Visual Basic Express Edition Study Guide
Visual Basic 9.0 Language Enhancements Entity Framework Linq To Sql Windows Phone 7 Development Unit Testing
ASP.NET MVC 3 (In Progress) ASP.NET MVC Hands On Project ASP.NET For Absolute Beginners Visual Web Developer C# Study Guide Visual Web Developer VB.NET Study Guide
ASP.NET Controls Series ASP.NET AJAX ASP.NET Architecture Series ASP.NET Server Controls Silverlight 4.0
Windows Presentation Foundation Windows Forms Controls Visual Studio 2010 New Features Visual Studio Team System 2008 Visual Studio Team System Features
Getting Started With Sql Server Express Edition


dotNetVideos Premium Video Catalog

Interview Questions & Answers Windows AzureASP.NET MVC 4Windows Phone 7 (3 Videos)Visual Studio 2011 Application Lifecycle Management
LightSwitchHTML 5SOLIDVisual Studio Add-OnsVisual Studio 2010 ALM Lab Management
ASP.NET 4 Deep Dive Microsoft Enterprise Library 5 with ASP.NET 4 (10 Videos)Virtualization Techniques for Developer (5 Videos)Test Series - 70-519: Designing and Developing Web Applications Using Microsoft .NET Framework 4 (20+ Videos)
Test Series - 70-519: Supplemental70-513: Test Series (MCTS) Windows Communication Foundation 4 (20+ Videos)70-515:Web Applications Development with Microsoft .NET Framework 4 (20+ Videos)Test Series - 70-516: Accessing Data with Microsoft .NET Framework 4 (20+ Videos)Test Series: 70-432: Microsoft SQL Server 2008, Implementation and Maintenance (20+ Videos)
Test Series: 70-433: SQL Server AdministrationFrom Novice To Professional - C# (25 Videos)From Novice To Professional - VB.NET (25 Videos)




Premium (Not Free) Video Tutorials

Free Video Tutorials & Free Tools

Button Object Examples: HTML DOM Event Object Examples – Javascript JS

Purpose: – Illustrates the for working with the . The Event object allows you to access properties related to events

Event Object Examples

Event Handlers
onabortEvent happens when loading of image is interrupted.
onblurEvent happens when an element loses focus.
onchangeEvent happens when the content of a field is altered.
onclickEvent happens when mouse clicks an object.
ondblclickEvent happens when mouse double-clicks an object.
onerrorEvent happens when an error occurs.
onfocusEvent happens when an element gains focus.
onkeydownEvent happens when a key is pressed.
onkeypressEvent happens when key is held down or pressed.
onkeyupEvent happens when key is released.
onloadEvent happens when an image or page has finished loading.
onmousedownEvent happens when a mouse button is pressed.
onmousemoveEvent happens when mouse is moved.
onmouseoutEvent happens when mouse is moved off an element.
onmouseoverEvent happens when mouse is moved over an object.
onmouseupEvent happens when mouse button is released.
onresetEvent happens when a reset button is clicked.
onresizeEvent happens when a frame or window is resized.
onselectEvent happens when text is selected.
onsubmitEvent happens when submit button is clicked.
onunloadEvent happens when person leaves page.
Mouse/Keyboard Attributes
altKeyAllows access to whether the alt key was pressed.
buttonAllows you to access which mouse button was pressed.
clientxAllows you to access the horizontal coordinate of the mouse when event was triggered.
clientyAllows you to access the vertical coordinate of the mouse when event was triggered.
ctrlKeyAllows you to access whether the control key was pressed.
metaKeyAllows you to access whether the meta key was pressed
relatedTargetAllows you to access the element related to the element that triggered the event.
screenxAllows you to access the horizontal coordinate of the mouse pointer when the event happened.
screenyAllows you to access the vertical coordinate of the mouse pointer when the event happened.
shiftKeyAllows you to access the whether the shift key was pressed.
Other Event Attributes
bubblesAllows access to boolean value that indicates whether event is bubbling event.
cancelableAllows you to access boolean value that shows whether event can prevent default action.
currentTargetAllows you to access the element whose event listeners triggered the event.
eventPhaseAllows you to access to which phase of the event flow is being evaluated.
targetAllows you to access to element that triggered event.
timeStampAllows you to access to the timestamp in milliseconds from system start or event trigger.
typeAllows you to access the name of the event.
screenxAllows you to access the horizontal coordinate of the mouse pointer when the event happened.
screenyAllows you to access the vertical coordinate of the mouse pointer when the event happened.
shiftKeyAllows you to access the whether the shift key was pressed.

Related posts:

  1. Button Object Examples: HTML DOM Button Object Examples – Javascript JS Button Object Examples: HTML DOM Button Object Examples - Javascript...
  2. Javascript (JS) Body Object Examples: HTML DOM – Javascript (JS) Body Object Examples Javascript (JS) Body Object Examples: HTML DOM - Javascript (JS)...
  3. Javascript (JS) Area Examples: HTML DOM Object – Javascript (JS) Area Examples Javascript (JS) Area Examples: HTML DOM Object - Javascript (JS)...
  4. Anchor Examples: HTML DOM Anchor Object – Properties and Methods – Javascript Anchor Examples Anchor Examples: HTML DOM Anchor Object - Properties and Methods...
  5. Javascript (JS) Base Examples: HTML DOM Object- Javascript (JS) Base Examples Javascript (JS) Base Examples: HTML DOM Object- Javascript (JS) Base...

Related posts brought to you by Yet Another Related Posts Plugin.

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!

Powered by WP Hashcash

This blog uses the cross-linker plugin developed by Web-Developers.Net