showing results for - "events in javascript"
Francesco
30 Sep 2016
1Events:
2
3Mouse:
4onclick
5The event occurs when the user clicks on an element
6oncontextmenu
7User right-clicks on an element to open a context menu
8ondblclick
9The user double-clicks on an element
10onmousedown
11User presses a mouse button over an element
12onmouseenter
13The pointer moves onto an element
14onmouseleave
15Pointer moves out of an element
16onmousemove
17The pointer is moving while it is over an element
18onmouseover
19When the pointer is moved onto an element or one of its children
20onmouseout
21User moves the mouse pointer out of an element or one of its children
22onmouseup
23The user releases a mouse button while over an element
24
25Keyboard:
26onkeydown
27When the user is pressing a key down
28onkeypress
29The moment the user starts pressing a key
30onkeyup
31The user releases a key
32
33Frame:
34onabort
35The loading of a media is aborted
36onbeforeunload
37Event occurs before the document is about to be unloaded
38onerror
39An error occurs while loading an external file
40onhashchange
41There have been changes to the anchor part of a URL
42onload
43When an object has loaded
44onpagehide
45The user navigates away from a webpage
46onpageshow
47When the user navigates to a webpage
48onresize
49The document view is resized
50onscroll
51An element’s scrollbar is being scrolled
52onunload
53Event occurs when a page has unloaded
54
55Form:
56onblur
57When an element loses focus
58onchange
59The content of a form element changes (for <input>, <select>and <textarea>)
60onfocus
61An element gets focus
62onfocusin
63When an element is about to get focus
64onfocusout
65The element is about to lose focus
66oninput
67User input on an element
68oninvalid
69An element is invalid
70onreset
71A form is reset
72onsearch
73The user writes something in a search field (for <input="search">)
74onselect
75The user selects some text (for <input> and <textarea>)
76onsubmit
77A form is submitted
78
79Drag:
80ondrag
81An element is dragged
82ondragend
83The user has finished dragging the element
84ondragenter
85The dragged element enters a drop target
86ondragleave
87A dragged element leaves the drop target
88ondragover
89The dragged element is on top of the drop target
90ondragstart
91User starts to drag an element
92ondrop
93Dragged element is dropped on the drop target
94
95Clipboard:
96oncopy
97User copies the content of an element
98oncut
99The user cuts an element’s content
100onpaste
101A user pastes content in an element
102
103Media:
104onabort
105Media loading is aborted
106oncanplay
107The browser can start playing media (e.g. a file has buffered enough)
108oncanplaythrough
109When browser can play through media without stopping
110ondurationchange
111The duration of the media changes
112onended
113The media has reached its end
114onerror
115Happens when an error occurs while loading an external file
116onloadeddata
117Media data is loaded
118onloadedmetadata
119Meta Metadata (like dimensions and duration) are loaded
120onloadstart
121Browser starts looking for specified media
122onpause
123Media is paused either by the user or automatically
124onplay
125The media has been started or is no longer paused
126onplaying
127Media is playing after having been paused or stopped for buffering
128onprogress
129Browser is in the process of downloading the media
130onratechange
131The playing speed of the media changes
132onseeked
133User is finished moving/skipping to a new position in the media
134onseeking
135The user starts moving/skipping
136onstalled
137The browser is trying to load the media but it is not available
138onsuspend
139Browser is intentionally not loading media
140ontimeupdate
141The playing position has changed (e.g. because of fast forward)
142onvolumechange
143Media volume has changed (including mute)
144onwaiting
145Media paused but expected to resume (for example, buffering)
146Animation
147animationend
148A CSS animation is complete
149animationiteration
150CSS animation is repeated
151animationstart
152CSS animation has started
153
154Other:
155transitionend
156Fired when a CSS transition has completed
157onmessage
158A message is received through the event source
159onoffline
160Browser starts to work offline
161ononline
162The browser starts to work online
163onpopstate
164When the window’s history changes
165onshow
166A <menu> element is shown as a context menu
167onstorage
168A Web Storage area is updated
169ontoggle
170The user opens or closes the <details> element
171onwheel
172Mouse wheel rolls up or down over an element
173ontouchcancel
174Screen touch is interrupted
175ontouchend
176User finger is removed from a touch screen
177ontouchmove
178A finger is dragged across the screen
179ontouchstart
180Finger is placed on touch screen
Camilla
19 Nov 2019
1addEventListener("code", function() {
2  // code
3});
Alessandra
16 Feb 2019
1<!DOCTYPE html>
2<html>
3<body>
4
5<h1 onclick="this.innerHTML = 'Ooops!'">Click on this text!</h1>
6
7</body>
8</html>
Myla
25 Apr 2019
1formatCardNumber: function(number) {
2		var v = number.replace(/\s+/g, '').replace(/[^0-9]/gi, '')
3		var matches = v.match(/\d{4,16}/g);
4		var match = matches && matches[0] || '';
5		var parts = [];
6
7		for (var i=0, len=match.length; i<len; i+=4) {
8			parts.push(match.substring(i, i+4));
9		}
10
11		if (parts.length) {
12			// creditCardField.set('v.value', parts.join(' '));
13			return parts.join(' ');
14
15		} else {
16			// creditCardField.set('v.value', value);
17			return number;
18		}
19	}
20
Emil
17 Jan 2017
1document.querySelector('html').onclick = function() {
2    alert('Ouch! Stop poking me!');
3}
queries leading to this page
events document javascriptjavascript eventsevents in javascriptjavascript event functionsevent in javascriptw3 schools javascript eventsevents with eventsfunction for events javascriptw3schools js dom eventsevent javascripton js eventevent jsjavascript w3schools eventsjavascript function eventjavaascript on method events what is event in javascriptscript element events event in javascriptjs events for html elementevents dom javascriptevent jselement eventselement dom eventsevents javascriptdocument javascript eventsevents jacascriptwhat are events for html domjavascript eventusing events in function jshtml element events javascriptjavascript html eventsdom element events 24event javascriptdom and dom eventsjavascript define eventdom events w3schoolshtml dom events and event handlerjs element eventsjs event functionjs events w3js html dom eventsevents in javscriptbasic events in javascripthow dom is used in events in javascriptjs eventsevent in javascript w3schoolsevents javascript w3schoolsjs eventjavascripts eventsreference dom events w3schoolsdom events js w3schoolsjavadcript eventshtml js eventsjavascript events meaningevent in function jsw3schools com dom object eventsevents used in javascriptevents in js w3schoolsa element js eventsjavascript 24eventfunction events jsw3schools events javascripthow does events in the dom workwhat is new event in jswhat is event in javascriptjavascript on 28 29 eventsevents in javascript dom events in javascript infojavascript event e javascript how to use eventson events jsw3 dom eventsjs event 28 29events javascript w3html events javascriptevents methods javascriptjscript eventsjavasctript eventsjavascript element eventshtml document eventsevent methods in javascriptjavascript html dom eventsevent code javascriptevent which in javascripthow to use events in javascripteventy jsjavascript event eventswhat is event in dom htmdocument events htmljs events jsevent which javascriptwhat is event in javascript with examplehtmlelement eventsevent in htmlwhat is javascript eventsjavascript dom events examplejavascrip eventsdom events in jsbrowser dom eventsjavascript events tutorialjavascript document eventsevents jswhat are js eventsevents page javascriptevents explained dom html script eventswhat is events in javascripton events javascriptjavasript eventsevent 28 29 javascriptw3 js eventsevents jsevent jacascriptwhat is event in jshow to handle dom events in javasriptjs events w3schoolshtml events in javascriptjavascript dom eventshtml dom eventshow do events work in jsdom events javascripthow to add an event in javascriptw3school javascript eventsevents in html domwhat are events in domevent in javascriptsw3schools js eventsw3c dom eventswhat is a event object in jshtml script element eventsevents in javascriptswhat are events in javascriptevent in jshtml elements eventsdocument events in javascriptjs function eventjavascript events w3events in javascript w3schoolsjava script eventsevents domjavascript events w3schoolshow to use event in dom javascriptevents in jsjavsxript events javascript eventsjavascript do eventsdom events in javascriptwhat are dom eventsw3schools javascript dom eventsw3schools dom eventson javascript eventsevent on this javascriptjavascript function with eventjavascripts eventjavascript on eventsdom event in javascriptevent js w3schoolsw3schools html dom eventsjs script events 24event in jsevents in jsevent on javascriptdom event javascriptjs html eventswhat javascript events arepage events javascriptjs dom and eventshtml dom event in javascriptevent which javascriptwhat are the events in javascripthtml element eventswhat are javascript eventsmethod eventswhat is an event javascriptevents javascript methodswindow dom eventscomplete javascript dom events tutorial with examples dom events htmlw3s js eventseventy w jsjs dom eventsevents on javascriptwhat are the dom eventsjavscript eventsjavascript events examplejavascript events htmldom eventsevents with jsdom event w3dom on eventsjs on events 24event jsjavascript event functionevents in javascript htmlevent function in javascriptdocument events javascriptevents in javascript