var x;
變化;
函數$(id)
{
回傳modocument.getElementById(id)
}
函數modocument.getElementById(id)
}
函數modocumdown( )
{
x=event.clientX-$("px ").style.pixelLeft;
y=event.clientY-$("px").style.pixelTop;
$( "px").style.border="2px 純紅";
$("px").onmousemove = mousemove;
}
function mouseup()
{
$(" px").onmousemove = "";
$("px").style.border="";
}
function mousemove()
{
$("px") .style.pixelLeft=event.clientX-x;
$("px").style.pixelTop=event.clientY-y;
}
腳本>
頭>
onmousedown="mousedown( )" onmouseup="mouseup()" >
身體>