A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/dom/MouseEvent/mousemove below:

mousemove ยท WebPlatform Docs

mousemove Summary

Fires when the user moves the mouse over the object.

Overview Table Synchronous No Bubbles Yes Target dom/Element Cancelable No Default action none

## Examples

This example uses the onmousemove event to monitor the location of the mouse cursor on the screen. When the mouse cursor moves over the div object, a span object is updated with the clientX and clientY property values. The clientX and clientY properties are exposed by the event object.

<script type="text/javascript">
function fnTrackMouse(){
   oNotice.innerText="Coords: (" + event.clientX + ",
      " + event.clientY + ")";
}
</script>
<div id="oScratch" onmousemove="fnTrackMouse()">
  <span id="oNotice"></span>
</div>

View live example

Add mouse crosshairs to a web page when a checkbox is clicked.

function moveCrosshairs(evt){
         if(!evt)evt=window.event;
         var posx = 0; var posy = 0;
         if(document.documentMode&&document.documentMode>=9){
         posx+=parseInt(document.documentElement.style.marginLeft+0);
         posy+=parseInt(document.documentElement.style.marginTop+0);
         }
         if (evt.pageX

View live example

Notes Remarks

If the user presses a mouse button, use the button property to determine which button was pressed. Initiates any action associated with this event. To invoke this event, do one of the following:

Syntax Standards information Event handler parameters
pEvtObj [in]
Type: ****IHTMLEventObj****
Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4