語法展示:: http://home.graffiti.net/fghfhghbgf/
請用IE6.0或更新版本觀看語法特效展示
將以下程式碼複製,貼在<body>及</body>標籤之間。 不要忘記付件也要一起帶回家喔~!!...... >>>>>>我是附件帶我回家<<<<<<< 下載後解壓縮,將圖檔置於網頁同一目錄下
<div id="showimage" style="position:absolute;width:250;left:120;top:160">
<table width="100%" height="100%" border="1" bordercolor="#0080FF" cellspacing="0" cellpadding="2">
<tr bgcolor="#0080FF">
<td width="100%" onMousedown="initializedragie()">
<ilayer onSelectStart="return false">
<layer onMouseover="dragswitch=1;drag_dropns(showimage)" onMouseout="dragswitch=0">
<ilayer>
<layer onMouseover="dragswitch=1;drag_dropns(showimage)" onMouseout="dragswitch=0">
<font face="細明體" size="3" color="#FFFFFF">浮動視窗</font>
</layer>
</ilayer>
</layer>
</ilayer>
</td>
<td>
<a href="#" onClick="hidebox();return false"><img src="01.gif" border="0"></a>
</td>
</tr>
<tr>
<td colspan="2">
<font face="細明體" size="2" color="#80BFFF">這是個浮動的視窗!在此視窗標題列上按著滑鼠左鍵不放可拉著到處跑,也可關閉這個視窗喔 ^_^</font>
</td>
</tr>
</table>
</div>
將以下程式碼複製,貼在<head>及</head>標籤之間。
<script language="JavaScript1.2">
<!--
var dragswitch=0
var nsx
var nsy
var nstemp
function drag_dropns(name){
temp=eval(name)
temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP)
temp.onmousedown=gons
temp.onmousemove=dragns
temp.onmouseup=stopns
}
function gons(e){
temp.captureEvents(Event.MOUSEMOVE)
nsx=e.x
nsy=e.y
}
function dragns(e){
if (dragswitch==1){
temp.moveBy(e.x-nsx,e.y-nsy)
return false
}
}
function stopns(){
temp.releaseEvents(Event.MOUSEMOVE)
}
var dragapproved=false
function drag_dropie(){
if (dragapproved==true){
document.all.showimage.style.pixelLeft=tempx+event.clientX-iex
document.all.showimage.style.pixelTop=tempy+event.clientY-iey
return false
}
}
function initializedragie(){
iex=event.clientX
iey=event.clientY
tempx=showimage.style.pixelLeft
tempy=showimage.style.pixelTop
dragapproved=true
document.onmousemove=drag_dropie
}
if (document.all){
document.onmouseup=new Function("dragapproved=false")
}
function hidebox(){
if (document.all)
showimage.style.visibility="hidden"
else if (document.layers)
document.showimage.visibility="hide"
}
-->
</script>
留言列表