※ 可以用滑鼠移動的圖片和文字 ※
|
<style> <!-- .drag{position:relative;cursor:hand} --> </style> <style fprolloverstyle>A:hover {color: red; font-weight: bold} </style> </head> <body background="jpg/01_bkg1.jpg"> <script language="JavaScript1.2"> <!-- 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> <p align="center"><img src="jpg/hand.gif" class="drag" width="88" height="31"><br> <h2 align="center"><b class="drag">歡迎光臨動力資訊網</b></h2> <p align="center"> </p> |