<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 >
<DIV CONTENTEDITABLE="true">
<DIV style="width:300px;height:100px; color:white; background-color:red;
position:absolute;">
My DIV</DIV>
</DIV>
</BODY>
</HTML>