Return Value: A Boolean.Returns true if the CTRL key was pressed when a mouse event occurs. Otherwise it returns false. DOM Version: DOM Level 2 Events.Browser Supportevent.ctrlKey is a DOM Level 2 (2001) feature.It is fully supported in all browsers:...
JavaScript Certificate Front End Certificate SQL Certificate Python Certificate PHP Certificate jQuery Certificate Java Certificate C++ Certificate C# Certificate XML Certificate FORUM ABOUT ACADEMY W3Schools is optimized for learning and training. Examples might be simplified to improve re...
Using Event Helpers Some types of events are fairly common, and jQuery provides shorthand helper functions to make your code a little easier to write and read. Some examples: hover(): use this instead of mouseover and mouseleave events click(): listens for click events dblclick(): listens ...
JavaScript Certificate Front End Certificate SQL Certificate Python Certificate PHP Certificate jQuery Certificate Java Certificate C++ Certificate C# Certificate XML Certificate FORUM ABOUT ACADEMY W3Schools is optimized for learning and training. Examples might be simplified to improve re...
❮ DOM Events ❮ Event Objects Track your progress - it's free! Log in Sign Up COLOR PICKER PLUS SPACES GET CERTIFIED FOR TEACHERS FOR BUSINESS CONTACT US Top Tutorials HTML Tutorial CSS Tutorial JavaScript Tutorial How To Tutorial SQL Tutorial Python Tutorial W3.CSS Tutorial Bootstrap ...
The horizontal screen pixel coordinate of the mouse pointer DOM Version: DOM Level 2 Mouse EventsMore ExamplesExample The differences between screenX and screenY and clientX and clientY: let sX = event.screenX; let sY = event.screenY; let cX = event.clientX; let cY = event.clientY; Try ...
JavaScript Certificate Front End Certificate SQL Certificate Python Certificate PHP Certificate jQuery Certificate Java Certificate C++ Certificate C# Certificate XML Certificate FORUM ABOUT ACADEMY W3Schools is optimized for learning and training. Examples might be simplified to improve re...
1 : Left mouse button 2 : Right mouse button 4 : Wheel or middle button 8 : Fourth button (Browser Back) 16 : Fifth button (Browser Forward) For a left-hand configured mouse, the values are reversed. DOM Version: DOM Level 3 EventsBrowser...
JavaScript Events Syntax In HTML: <elementonmouseenter="myScript"> Try it Yourself » In JavaScript: object.onmouseenter=function(){myScript}; Try it Yourself » In JavaScript, using the addEventListener() method: object.addEventListener("mouseenter",myScript); ...
DOM Version:DOM Level 3Mouse Events. More Examples Example Is the shift key breing pressed down? varx =event.getModifierState("Shift"); Try it Yourself » Related Pages HTML DOM reference:MouseEvent altKey Property HTML DOM reference:MouseEvent ctrlKey Property ...