Sets or retrieves the x-coordinate of the mouse pointer's position relative to the client area of the window, excluding window decorations and scroll bars.
Sets or retrieves the y-coordinate of the mouse pointer's position relative to the client area of the window, excluding window decorations and scroll bars.
Sets or retrieves the y-coordinate, in pixels, of the mouse pointer's position relative to a relatively positioned parent element.
Remarks
The onmoveend event fires only when an editable element stops moving.
This event can only be bound to absolutely positioned elements.
Example
The following example shows how to use the onmoveend event with a movable DIV and have the background color and inner text change when the mouse button is released and the DIV stops moving.
<HTML>
<HEAD>
<TITLE>Editing events sample page</TITLE>
<SCRIPT>
// Turn on 2D positioning
document.execCommand("2D-position",false,true);
// Fires when the onmovestart event is fired
function fnHandleMoveStart() {
var oDiv = event.srcElement
oDiv.style.backgroundColor = "green";
oDiv.innerText = "I Started Moving";
}
// Function called when the onmoveend event is fired
function fnHandleMoveEnd() {
var oDiv = event.srcElement
oDiv.style.backgroundColor = "red";
oDiv.innerText = "I Stopped";
}
</SCRIPT>
</HEAD>
<BODY onmovestart="fnHandleMoveStart();" onmoveend="fnHandleMoveEnd();">
<DIV CONTENTEDITABLE="true">
<DIV style="width:300px;height:100px; color:white; background-color:red;
position:absolute;">
My DIV</DIV>
</DIV>
</BODY>
</HTML>
This feature requires Microsoft® Internet Explorer 5.5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.
Standards Information
There is no public standard that applies to this event.