<span style='position:absolute;'  onmousedown="MouseDown(this)"
  onmousemove="MouseMove()" onmouseup="MouseUp()">
  <img src="http://community.csdn.net/images/CSDN_logo.GIF"></span>
<script language=javascript>
var Obj;
function MouseDown(obj)
{
  Obj=obj;
  Obj.setCapture();
  Obj.l=event.x-Obj.style.pixelLeft;
  Obj.t=event.y-Obj.style.pixelTop;
}
function MouseMove()
{
  if(Obj!=null)
  {
    Obj.style.left = event.x-Obj.l;
    Obj.style.top = event.y-Obj.t;
  }
}
function MouseUp()
{
  if(Obj!=null)
  {
    Obj.releaseCapture();
    Obj=null;
  }
}
</script>