大虾救命,下拉式菜单

mizukusa 2009-05-26 01:41:05
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>left</title>
<link rel="stylesheet" href="css/base.css" type="text/css">
</head>
<script language="javascript">
function hideAll() {
for(i=0;i<odiv.length;i++) {
odiv[i].style.display="none";
}
}
function showObj(num) {
if (odiv[num].style.display=="none") {
hideAll();
odiv[num].style.display="inline";
}else {
odiv[num].style.display="none";
}
}
</script>
<body bgcolor=Lavender>
<table>
<tr align ="left" height ="10">
<img src="menu.bmp" width="144" height="60">
</tr>
<tr height="20"></tr>
<!--***** 情報セキュリティ *****-->
<TR>
<TD WIDTH="40" ALIGN="CENTER">
<A HREF="security.html" onMouseOver="window.status='';return true" target="_parent">
<IMG SRC="blue.gif" BORDER="0" WIDTH="15" HEIGHT="15"></A>
</TD>
<TD WIDTH="140">
<A href="security.html" target="_parent" onMouseOver=this.style.color="#F75000" onMouseOut=this.style.color="#930093">
<B>情報セキュリティ</B>
</A>
</TD>
</TR>

<!--***** 座席表 *****-->
<TR>
<TD WIDTH="40" ALIGN="CENTER">
<A HREF="main.html" onMouseOver="window.status='';return true" target="_parent">
<IMG SRC="green.gif" BORDER="0" WIDTH="15" HEIGHT="15"></A>
</TD>
<TD WIDTH="140">
<A href="main.html" target="_parent" onMouseOver=this.style.color="#F75000" onMouseOut=this.style.color="#930093">
<B>座席表</B>
</A>
</TD>
</TR>
<!--***** 社員マスタ *****-->
<TR>
<TD WIDTH="40" valign="top" ALIGN="CENTER">
<A HREF="main2.html" onMouseOver="window.status='';return true" target="_parent">
<IMG SRC="red.gif" BORDER="0" WIDTH="15" HEIGHT="15"></A>
</TD>
<TD WIDTH="140">
<a href="#" onclick="showObj(0)" onMouseOut=this.style.color="blue">
社員マスタ
</a>
<br>
<div id="odiv" style="display:none" >
<a href="person-create.html" target="mainFrame" onMouseOver=this.style.color="#F75000" onMouseOut=this.style.color="#930093">社員入社</a><br>
<a href="person-manage.html" target="mainFrame" onMouseOver=this.style.color="#F75000" onMouseOut=this.style.color="#930093">社員情報管理</a><br>
</div>
</TD>
</tr>
<tr>
<td>
<a href="#" ></a><br>
<div id="odiv" style="display:none" >
</div>
</td>
</tr>
</table>
</body>
</html>
为什么把 <td>
<a href="#" ></a><br>
<div id="odiv" style="display:none" >
</div>
</td>
删了最下面的那个菜单的下拉式就不能显示了。
...全文
150 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
mizukusa 2009-05-31
  • 打赏
  • 举报
回复
不行啊
mizukusa 2009-05-27
  • 打赏
  • 举报
回复
那我怎么改啊?大虾能不能说的详细一点。
guzhengfu 2009-05-27
  • 打赏
  • 举报
回复
学习再学习
cntmi 2009-05-27
  • 打赏
  • 举报
回复
study~~~~
pffyhp 2009-05-27
  • 打赏
  • 举报
回复
up
ouyang3857116 2009-05-27
  • 打赏
  • 举报
回复

function showObj(num) {
if (odiv.style.display=="none") {
hideAll();
odiv.style.display="inline";
}else {
odiv.style.display="none";
}
}
ouyang3857116 2009-05-26
  • 打赏
  • 举报
回复
同意楼上,你要是想删除的话,把odiv[num]改成odiv就可以了
Go 旅城通票 2009-05-26
  • 打赏
  • 举报
回复
你删除了那段代码后,odiv就是dom元素了,而非dom元素数组了

因为你有两个id为odiv的div控件
jiatai416 2009-05-26
  • 打赏
  • 举报
回复
好复杂。顶下

87,921

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧