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 onmovestart event fires only when an editable element starts to move.
This event can only be bound to absolutely positioned elements.
Example
The following example shows how to use the onmovestart event with a movable DIV and have the background color and inner text change when the DIV starts to move.
<HTML>
<HEAD>
<TITLE>Editing events sample page</TITLE>
<SCRIPT>
// Turn on 2-D positioning
document.execCommand("2D-position",false,true);
// Function called when the onmovestart event is fired
function fnHandleMoveStart() {
var oDiv = event.srcElement
oDiv.style.backgroundColor = "green";
oDiv.innerText = "I Started Moving";
}
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.