語法說明: 

1.在 <img src="圖檔位置" class="drag"> 中修改您所要使用的圖檔位置








<!--可移圖示_開始-->
<script language="JavaScript">
<!--
var dragapproved=false
var z,x,y
function move(){
if (event.button==1&&dragapproved){
z.style.pixelLeft=temp1+event.clientX-x
z.style.pixelTop=temp2+event.clientY-y
return false
}
}
function drags(){
if (!document.all)
return
if (event.srcElement.className=="drag"){
dragapproved=true
z=event.srcElement
temp1=z.style.pixelLeft
temp2=z.style.pixelTop
x=event.clientX
y=event.clientY
document.onmousemove=move
}
}
document.onmousedown=drags
document.onmouseup=new Function("dragapproved=false")
-->
</script>
<style>
<!--
.drag{position:relative;cursor:hand}
-->
</style>
<img src="圖檔位置" class="drag">
<!--可移圖示_結束-->

arrow
arrow
    全站熱搜

    nicole 發表在 痞客邦 留言(0) 人氣()