?? 3-23.htm
字號:
<div id="KBStatic" style="position:absolute; left:3px; top:0px; width:553px; height:70px; z-index:25">
<a href="http://www.JavaScript.com">JavaScript全球網站</a></div>
<script language=JavaScript>
function KB_keepItInIE(theName,theWantTop,theWantLeft) {<!--ie瀏覽器中的函數-->
theRealTop=parseInt(document.body.scrollTop)<!--獲取實際頁面的上邊界-->
theTrueTop=theWantTop+theRealTop<!--鏈接的頂部未實際頁面上邊界+間距-->
document.all[theName].style.top=theTrueTop<!--更新鏈接的上邊界-->
theRealLeft=parseInt(document.body.scrollLeft)<!--獲取實際頁面的左邊界-->
theTrueLeft=theWantLeft+theRealLeft<!--鏈接的頂部未實際頁面左邊界+間距-->
document.all[theName].style.left=theTrueLeft<!--更新鏈接的左邊界-->
}
function KB_keepItInNN(theName,theWantX,theWantY) {<!--netscape瀏覽器中的函數-->
theRealLay=document.layers[theName]
theBadX=self.pageYOffset<!--獲取實際頁面的上邊界-->
theBadY=self.pageXOffset<!--獲取實際頁面的左邊界-->
theRealX=theBadX+theWantX<!--鏈接的頂部未實際頁面左邊界+間距-->
theRealY=theBadY+theWantY<!--鏈接的頂部未實際頁面上邊界+間距-->
theRealLay.moveTo(theRealY,theRealX)<!--更新鏈接的邊界-->
}
IE4=(document.all)?1:0<!--ie瀏覽器的標志-->
NN4=(document.layers)?1:0<!--netscape瀏覽器的標志-->
if (IE4)
setInterval('KB_keepItInIE("KBStatic",100,30)',1)<!--調用ie的函數-->
if (NN4)
setInterval('KB_keepItInNN("KBStatic",100,30)',1)<!--調用netscape的函數-->
</script>
<!--本例程實現了固定鏈接位置的功能-->
<!--鏈接的位置控制-->
<!--對不同瀏覽器的不同方法-->
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -