因為用flash做出來的下拉式選單,還不是很熟也不大會@@"
今天無意中從朋友那邊A到這個JAVA範例檔
1.放在<head>與</head>之間複製程式
<link href="../default.css" rel="stylesheet" type="text/css">
<script language="JScript">
var MediaList=new Array();
TitleArray0=["資源下載","資源上傳","資源統計","資源檢索","資源刪除","資源信息修改","資源審核情況","資源更新信息"];
var EventArray0=["../01.htm","../02.htm","../03.htm","../04.htm","../05.htm"];
var TitleArray1=["知識點瀏覽","分類瀏覽"];
var EventArray1=["application/resvie/re_v_p_index.asp","application/resvie/re_v_i_index.asp"];
TitleArray2=["個人信息","修改個人信息","權限申請","用戶組管理","設置用戶組","修改用戶組","修改用戶權限","增加用戶","用戶統計"];
var EventArray2=["application/usermanage/index_u.htm","application/usermanage/index_m.htm","application/usermanage/index_a.htm","application/usermanage/index_r.htm"];
TitleArray3=["修改學科","學科列表","增加學科","刪除學科",true,"增加資源類型","刪除資源類型",true,"知識點列表","增加知識點","刪除知識點","移動知識點","修改知識點"];
var EventArray3=["application/usermanage/index_u.htm","application/usermanage/index_m.htm","application/usermanage/index_a.htm","application/usermanage/index_r.htm"];
var TitleArray4=["增加收藏資源","刪除收藏資源","移動收藏資源"];
function AstrNode(SIndex){var EventArray4=["application/usermanage/index_u.htm","application/usermanage/index_m.htm","application/usermanage/index_a.htm","application/usermanage/index_r.htm"];
var str=[];
var CW_Array=eval("TitleArray"+SIndex);
var En_Array=eval("EventArray"+SIndex);
for(var i=0;i<CW_Array.length;i++){
if(CW_Array[i]!=true){
str[i]="<tr><td style='height:20' onclick='top.mainFrame.location=\""+En_Array[i]+"\"'><a href='#'>"+CW_Array[i]+"</a></td></tr>";
}
else{
str[i]="<tr><td style='font-size:1;background:#cccccc'></td></tr>";
}
}
return "<table class='trd' width=颼' border=Ɔ' cellspacing=Ɔ' cellpadding=Ɔ' style='font-size:9pt;border:1 solid #595432'>"+str.join("")+"</table>";
}
function ShowMenu(SIndex){
var obj=event.srcElement;
var New_CW=window.createPopup();
var CW_Body=New_CW.document.body;
New_CW.document.createStyleSheet("default.css");
var CW_Array=eval("TitleArray"+SIndex);
CW_Body.innerHTML=AstrNode(SIndex);
New_CW.show(event.screenX-event.offsetX-2,event.screenY-event.offsetY+22,100,CW_Array.length*20+2+(SIndex==3?-38:0));
}
function goUrl(Url){
parent.mainFrame.location=Url;
}
</script>
<style type="text/css">
<!--
.tdcs {
padding-bottom:2;
color:#000000;
}
-->
</style>
2.將下面的語法複製到<body>裡複製程式
<body leftmargin="0" topmargin="0"><script type='text/javascript' src='/pop.js'></script>
3.將下面的語法複製到<body>兩</body>裡複製程式
<div>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" background="c.gif" bgcolor="#FFFFFF" style="cursor:hand">
<tr>
<td width="14" align="center" bgcolor="#FFFFFF"><img src="../l.gif" width="14" height="26"></td>
<td width="80" align="center" onmouseover="this.style.color='#999999'" onmouseout="this.style.color=''" onclick="parent.location='main.asp'">首頁</td>
<td width="80" align="center" id="TitleBox" onmouseover="ShowMenu(0);this.style.color='#999999'" onmouseout="this.style.color=''" onclick="parent.location='unlogin.asp'">資源管理</td>
<td width="80" align="center" id="TitleBox" onmouseover="ShowMenu(1);this.style.color='#999999'" onmouseout="this.style.color=''" onclick="goUrl('application/resmanage/index.htm')">資源瀏覽</td>
<td width="80" align="center" id="TitleBox" onmouseover="ShowMenu(2);this.style.color='#999999'" onmouseout="this.style.color=''" onclick="goUrl('#')">用戶管理</td>
<td width="80" align="center" id="TitleBox" onmouseover="ShowMenu(3);this.style.color='#999999'" onmouseout="this.style.color=''" onclick="goUrl('#')">系統管理</td>
<td width="80" align="center" id="TitleBox" onmouseover="ShowMenu(4);this.style.color='#999999'" onmouseout="this.style.color=''" onclick="goUrl('#')">我的最愛</td>
<td width="80" align="center" onmouseover="this.style.color='#999999'" onmouseout="this.style.color=''" onclick="parent.location=༽.htm'">用戶手冊</td>
<td width="80" align="center" onmouseover="this.style.color='#999999'" onmouseout="this.style.color=''" onclick="parent.mainFrame.location=༾.htm'">登出</td>
<td width="80" align="center" onmouseover="this.style.color='#999999'" onmouseout="this.style.color=''" onclick="top.opener=null;top.close()">關閉視窗</td>
<td> </td>
<td width="12" align="right" bgcolor="#FFFFFF"><img src="../r.gif" width="12" height="26"></td>
</tr>
</table>
</div>
如果懶的話直接下載附件的檔案去修改比較快