5 function onDragStart(event
) {
6 var dragImage
= document
.getElementById('dragImage');
7 event
.dataTransfer
.setDragImage(
8 dragImage
, dragImage
.offsetWidth
/ 2, dragImage
.offsetHeight
/ 2);
13 <p><img id=
"dragImage" src=
"resources/webkit-background.png">
14 <p>Try dragging the image or the link below. The drag image should be
15 identical to the image above, centered on the cursor.
16 <p><a href=
"#" ondragstart=
"onDragStart(event)">Drag Me
</a>
17 <p><img src=
"resources/3dolph.gif" ondragstart=
"onDragStart(event)">