<style> <!--.drag{position:relative;cursor:hand} --> </style> <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>
<script> var limit="0:10" if (document.images){ var parselimit=limit.split(":") parselimit=parselimit[0]*60+parselimit[1]*1} function beginrefresh(){ if (!document.images) return if (parselimit==1) window.location.reload() else{ parselimit-=1 curmin=Math.floor(parselimit/60) cursec=parselimit%60 if (curmin!=0) curtime=curmin+"分"+cursec+"秒后重刷本页!" else curtime=cursec+"秒后重刷本页!" window.status=curtime setTimeout("beginrefresh()",1000) }} window.onload=beginrefresh </script> 拖动图片试一试!<br> <img src="img/1.jpg" class="drag"> <img src="img/2.jpg" class="drag">
</center> |