×
HOI
HTML
CSS
JAVASCRIPT
SQL
PHP
jQUERY
ANGULAR
BOOTSTRAP
XML
TUTORIALS
REFERENCES
EXAMPLES
FORUM
SRCH
JS
Tutorial
JS HOME
JS Introduction
JS Where To
JS Output
JS Syntax
JS Statements
JS Comments
JS Variables
JS Operators
JS Data Types
JS Functions
JS Objects
JS Scope
JS Events
JS Strings
JS String Methods
JS Numbers
JS Number Methods
JS Math
JS Dates
JS Date Methods
JS Arrays
JS Array Methods
JS Booleans
JS Comparisons
JS Conditions
JS Switch
JS Loop For
JS Loop While
JS Breaks
JS Type Of
JS Conversion
JS RegExp
JS Errors
JS Debugging
JS Hoisting
JS Strict Mode
JS Style Guide
JS Best Practices
JS Mistakes
JS Performance
JS Reserved Words
JS JSON
JS
Objects
Object Definitions
Object Properties
Object Methods
Object Prototypes
JS
Functions
Function Definitions
Function Parameters
Function Invocation
Function Closures
JS
HTML DOM
DOM Intro
DOM Methods
DOM Document
DOM Elements
DOM HTML
DOM CSS
DOM Events
DOM EventListener
DOM Navigation
DOM Nodes
DOM Nodelist
JS
Browser BOM
JS Window
JS Screen
JS Location
JS History
JS Navigator
JS Popup Alert
JS Timing
JS Cookies
JS
Libraries
JS Libraries
JS jQuery
JS Prototype
JS
Examples
JS Examples
JS HTML DOM
JS HTML Input
JS HTML Objects
JS HTML Events
JS Browser
JS Quiz
JS Certificate
JS Summary
JS
References
JavaScript Objects
HTML DOM Objects
JavaScript
HTML DOM Events
Examples
« Previous
Next Chapter »
Examples of using JavaScript to react to events
Input Events
onblur - When a user leaves an input field
onchange - When a user changes the content of an input field
onchange - When a user selects a dropdown value
onfocus - When an input field gets focus
onselect - When input text is selected
onsubmit - When a user clicks the submit button
onreset - When a user clicks the reset button
onkeydown - When a user is pressing/holding down a key
onkeypress - When a user is pressing/holding down a key
onkeyup - When the user releases a key
onkeyup - When the user releases a key
onkeydown vs onkeyup - Both
Mouse Events
onmouseover/onmouseout - When the mouse passes over an element
onmousedown/onmouseup - When pressing/releasing a mouse button
onmousedown - When mouse is clicked: Alert which element
onmousedown - When mouse is clicked: Alert which button
onmousemove/onmouseout - When moving the mouse pointer over/out of an image
onmouseover/onmouseout - When moving the mouse over/out of an image
onmouseover an image map
Click Events
Acting to the onclick event
onclick - When button is clicked
ondblclick - When a text is double-clicked
Load Events
onload - When the page has been loaded
onload - When an image has been loaded
onerror - When an error occurs when loading an image
onunload - When the browser closes the document
onresize - When the browser window is resized
Others
What is the keycode of the key pressed?
What are the coordinates of the cursor?
What are the coordinates of the cursor, relative to the screen?
Was the shift key pressed?
Which event type occurred?
Examples explained
« Previous
Next Chapter »
Color Picker
×
HTML/CSS
HTML Tutorial
HTML5 Tutorial
CSS Tutorial
CSS3 Tutorial
Bootstrap Tutorial
JavaScript
JavaScript Tutorial
jQuery Tutorial
jQuery Mobile Tutorial
AngularJS Tutorial
AJAX Tutorial
JSON Tutorial
Graphics
Canvas Tutorial
SVG Tutorial
Google Maps Tutorial
Server Side
SQL Tutorial
PHP Tutorial
ASP Tutorial
ASP.NET Tutorial
VBScript Tutorial
AppML Tutorial
Web
Web Building
Web Statistics
Web Certification
XML
XML Tutorial
DTD Tutorial
Schema Tutorial
XML DOM Tutorial
XPath Tutorial
XSLT Tutorial
XQuery Tutorial
XSL-FO Tutorial
RSS Tutorial
WSDL Tutorial
×
HTML/CSS
HTML Tag Reference
HTML Event Reference
HTML Color Reference
CSS 1,2,3 Reference
Bootstrap Reference
JavaScript
JavaScript Reference
HTML DOM Reference
jQuery Reference
jQuery Mobile Reference
Google Maps Reference
Server Side
PHP Reference
SQL Reference
ASP Reference
VBScript Reference
Razor Reference
ASP.NET Reference
XML
XML DOM Reference
XSLT Reference
XSL-FO Reference
XPath Reference
XQuery Reference
Schema Reference
RSS Reference
SVG Reference
HTML Charsets
HTML Character Sets
HTML ASCII
HTML ANSI
HTML Windows-1252
HTML ISO-8859-1
HTML Symbols
HTML UTF-8
×
HTML/CSS
HTML Examples
CSS Examples
Browser Scripting
JavaScript Examples
HTML DOM Examples
jQuery Examples
jQuery Mobile Examples
AngularJS Examples
AJAX Examples
Server Scripting
PHP Examples
ASP Examples
VBScript Examples
Razor Examples
.NET Examples
XML Languages
XML Examples
DTD Examples
XML DOM Examples
XSL Examples
XSLT Examples
XPath Examples
XQuery Examples
Schema Examples
RSS Examples
SVG Examples