<BODY>
<table width="810" height="31" align=center border="0" cellspacing="0" cellpadding="0" background="/images/top/ds.gif" style="margin-top:100px">
<tr align=center>
<td width="75" class="top_1"><A HREF="?p=1" class="top_2" id="submen1"><div style="margin-top:6px">首 页</div></A></td>
<td width="75" class="top_1"><A HREF="?p=2" class="top_1" id="submen2"><div style="margin-top:6px">少儿吧</div></A></td>
<td width="75" class="top_1"><A HREF="?p=3" class="top_1" id="submen3"><div style="margin-top:6px">基础吧</div></A></td>
<td width="75" class="top_1"><A HREF="?p=4" class="top_1" id="submen4"><div style="margin-top:6px">职业吧</div></A></td>
<td width="75" class="top_1"><A HREF="?p=5" class="top_1" id="submen5" onClick="chageclass()"><div style="margin-top:6px">管理吧</div></A></td>
<td width="75" class="top_1"><A HREF="?p=6" class="top_1" id="submen6"><div style="margin-top:6px">电脑吧</div></A></td>
<td width="75" class="top_1"><A HREF="?p=7" class="top_1" id="submen7"><div style="margin-top:6px">英语吧</div></A></td>
<td width="75" class="top_1"><A HREF="?p=8" class="top_1" id="submen8"><div style="margin-top:6px">招生吧</div></A></td>
<td width="75" class="top_1"><A HREF="?p=9" class="top_1" id="submen9"><div style="margin-top:6px">教师吧</div></A></td>
<td width="75" class="top_1"><A HREF="?p=10" class="top_1" id="submen10"><div style="margin-top:6px">娱乐吧</div></A></td>
<td width="75" class="top_1"><A HREF="?p=11" class="top_1" id="submen11"><div style="margin-top:6px">图书吧</div></A></td>
<td width="60" align=right><IMG SRC="/images/top/right.gif" WIDTH="3" HEIGHT="31" BORDER=0></td>
</tr>
</table>
<script language="javascript">
<!--
var url=parent.location.search;
if (url.indexOf("?")!=-1){
var str=url.substr(1);
nn=str.split("=");
if (nn[1].indexOf("&")!=-1){
mm=nn[1].split("&");
m=mm[0];
for (i=1;i<=11;i++){
if (i==m){
getObject("submen"+i).className="top_2";
}
else{
getObject("submen"+i).className="top_1";
}
}
}
else{
n=nn[1];
for (i=1;i<=11;i++){
if (i==n){
getObject("submen"+i).className="top_2";
}
else{
getObject("submen"+i).className="top_1";
}
}
}
}
//document.all.submen10.className="top_2";
function getObject(objectId) {
if(document.getElementById && document.getElementById(objectId)) {
// W3C DOM
return document.getElementById(objectId);
} else if (document.all && document.all(objectId)) {
// MSIE 4 DOM
return document.all(objectId);
} else if (document.layers && document.layers[objectId]) {
// NN 4 DOM.. note: this won't find nested layers
return document.layers[objectId];
} else {
return false;
}
} // getObject
-->
</script>
</BODY>
以上是 网页上的大致代码,控制导航栏用的;我用了两次,导致 2个 导航栏 同步运动,
请教 如何让它们分开???
javascript脚本中 哪些变量 更改, 可以重复应用????????
请教 高手指教!!!!!!