Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
JavaScript mouse events
Play lesson

JavaScript Tutorial - JavaScript mouse events

4.0 (0)
13 learners

What you'll learn

This course includes

  • 12.3 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

Link for all dot net and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/01/javascript-mouse-events.html Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help. https://www.youtube.com/channel/UC7sEwIXM_YfAMyonQCrGfWA/?sub_confirmation=1 In this video we will discuss the commonly used JavaScript mouse events. Most browsers support these events. mouseover - Occurs when the mouse pointer is moved over an element mouseout - Occurs when the mouse pointer is moved out of an element mousemove - Occurs when the mouse pointer is moving while it is over an element mouseup - Occurs when the mouse button is released over an element mousedown - Occurs when the mouse button is pressed over an element click - Occurs when the mouse button is clicked. mousedown, mouseup & click events occur in sequence dblclick - Occurs when the mouse button is double-clicked. mousedown, mouseup, mousedown, mouseup, click & dblclick events occur in sequence contextmenu - Occurs when the mouse right button is clicked. mousedown, mouseup & contextmenu events occur in sequence Here is an example which logs the mouse events to textarea element as they occur. [input type="button" value="Single, Double or Right Click" onclick="logEvent(event)" onmousedown="logEvent(event)" onmouseup="logEvent(event)" onmouseover="logEvent(event)" onmouseout="logEvent(event)" ondblclick="logEvent(event)" oncontextmenu="logEvent(event)" /] [input type="button" value="Clear" onclick="clearText()"/] [br /][br /] [textarea id="txtArea" rows="10" cols="20"][/textarea] [script type="text/javascript"] function logEvent(event) { event = event || window.event; document.getElementById("txtArea").value += event.type + "\r\n"; } function clearText() { document.getElementById("txtArea").value = ""; } [/script]

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere