寶寶首頁
相簿
筆記本
日記
留言版


會員登入
加入會員
BabyHome 首頁

鋁箔包筆記簿
 
位置--> 筆記本●•網頁相關資料•● ●•語言教室•●






 浮動視窗2006-10-16 Page:1/1

<!--移動式公告小視窗開始--> <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> <div id="showimage" style="position: absolute; width: 250; left: 600; top: 190; height: 78"> <!--浮動視窗位置left: 600; top: 190 浮動視窗大小 width: 250;height: 78--> <table border="0" width="250" cellspacing="0" cellpadding="2" style="background:#F676B9"> <!--style="background:#F676B9"背景色﹙我可以拉開或關掉呢﹚跟框線--> <tr> <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0"height="40"> <tr> <td onMousedown="initializedragie()" style="cursor:hand" width="100%"><ilayer width="100%" onSelectStart="return false"> <layer width="100%" onMouseover="dragswitch=1;drag_dropns(showimage)" onMouseout="dragswitch=0"> <!--文字色font color="#808080"--><font color="#808080" font-size:9pt> 我可以拉開或關掉唷</font></layer></ilayer></td><td style="cursor:hand"><a href="#" onClick="hidebox();return false"><font color=white>x</font></td> </tr> <tr> <td width="100%" style="padding:4px;background:#F8C3DF" colspan="2"><!--background:#C0DFFB背景色...公告內文--> <font color="#808080" font-size:9pt>公告內文書寫處
</font></td></tr></table></td></tr></table> </div> <!--移動式小視窗結束-->