?? 10-10.htm
字號:
<SCRIPT language=JavaScript>
function move(x, y) {<!--對象移動x,y-->
if (document.all) {<!--對于ie瀏覽器-->
object1.style.pixelLeft += x;<!--左邊界移動x-->
object1.style.pixelTop += y;}<!--上邊界移動y-->
};
function position() {<!--對象位置移動-->
document.object1.left += -132;<!--左邊界向左移動-->
document.object1.top += 0;<!--上邊界不變-->
document.object1.visibility = "show"<!--設置為可視-->
};
function makeStatic() {
if (document.all) {object1.style.pixelTop=document.body.scrollTop+20}<!--對于ie瀏覽器,設置帶顯示對象的上邊界-->
}
</SCRIPT>
<STYLE type=text/css>.hl {
BACKGROUND-COLOR: highlight; COLOR: white; CURSOR: hand
}
</STYLE>
</HEAD>
<BODY leftMargin=0 topMargin=0>
<CENTER>
<LAYER class=NS onmouseout="move(-132, 0)" onmouseover="move(132, 0)" left="0"
bgcolor="black" name="object1" top="20" visibility="hide">
<SCRIPT language=JavaScript>
if (document.all)
document.write('<DIV ID="object1" style="Position : Absolute ;Left : -132px ;Top : 20px ;Width : 0px ;Z-Index : 20">')
</SCRIPT>
</LAYER>
<TABLE bgColor=#000000 border=0 cellPadding=2 cellSpacing=1
onmouseout="move(-132, 0)" onmouseover=move(132,0) width=150>
<TBODY>
<TR>
<TD bgColor=#FFFFFF><B><FONT size=3 face="隸書">菜 單</FONT></B></TD>
<TD align=middle bgColor=#C0C0C0 rowSpan=100 width=12>
<SCRIPT language=JavaScript>
if (document.all)
document.write('<p align="center"><font size="3" color="#FFFFFF" face="Arial Black">顯<br>示<br>菜<br>單</font></p>')
</SCRIPT>
</TD></TR>
<SCRIPT language=JavaScript>
makeStatic(); <!--調用makestatic函數-->
var sitems=new Array(); <!--存放鏈接的內容-->
var sitemlinks=new Array(); <!--存放鏈接的地址-->
sitems[0]="TOM"; <!--第一條鏈接的內容-->
sitems[1]="搜狐"; <!--第二條鏈接的內容-->
sitems[2]="網易"; <!--第三條鏈接的內容-->
sitemlinks[0]="http://www.tom.com"; <!--第一條鏈接的地址-->
sitemlinks[1]="http://www.sohu.com/"; <!--第二條鏈接的地址-->
sitemlinks[2]="http://www.yeah.net/"; <!--第三條鏈接的地址-->
for (i=0;i<=sitems.length-1;i++) <!--依次對每一個菜單進行處理-->
<!--對于ie瀏覽器,設置每個菜單的背景、鏈接、鼠標移動到上邊的響應函數,以及鼠標離開的函數-->
if (document.all) {document.write('<TR><TD bgcolor=white onclick="location=\''+sitemlinks[i]+'\'" onmouseover="className=\'hl\'" onmouseout="className=\'n\'"><FONT SIZE=2>'+sitems[i]+'</FONT></TD></TR>')}
function hl(n) {
n.className='hl'}<!--將當前菜單的格式設置為hl-->
function n(h) {
h.className='n'} <!--將當前菜單的格式設置為n-->
</SCRIPT>
</TBODY></TABLE>
<!--本例程實現了自動能夠隱藏菜單的效果-->
<!--菜單效果變化的實現方法-->
<!--對不同瀏覽器的支持-->
<!--對鼠標移動的函數響應-->
<!--統一格式的生成方法-->
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -