topical media & game development

talk show tell print

professional-javascript-13-SimulatedDragAndDropExample.htm / htm

          <title>Simulated Drag And Drop Example</title>
          <script type="text/javascript">
              function handleMouseMove(oEvent) {
                  var oDiv = document.getElementById("div1");
         = oEvent.clientX;
         = oEvent.clientY;
          <style type="text/css">
              #div1 {
                  background-color: red;
                  height: 100px;
                  width: 100px;
                  position: absolute;
      <body onmousemove="handleMouseMove(event)">
          <p>Try moving your mouse around.</p>
          <p><div id="div1"></div> </p>

(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.