HTML树形菜单伸缩问题

HTML树形菜单伸缩问题,第1张

<br><SPAN><IMG id="Image_Closed" style="DISPLAY: none" onclick="this.style.display='none'

Text_Closed.style.display='inline'

Image_Open.style.display='inline'

Text_Open.style.display='inline'"

src="pic/m_o.gif"><IMG id="Image_Open<%= i %>" onclick="this.style.display='none'

Image_Closed.style.display='inline'

Text_Open.style.display='none'

Text_Closed.style.display='inline'"

src="pic/m_c.gif"></SPAN>

<SPAN id="Text_Closed">大目录

<SPAN id="Text_Open" style="DISPLAY: none">'主要是这句话进行修改下

<SPAN>

<br> <IMG src="pic/m_c.gif" />小目录<br>

</SPAN>

</SPAN>

</SPAN>

<table border="0" cellspacing="0" cellpadding="0">

<tr>

<td scope="row"><table border="1">

<tr>

<td id="showbfq" height="20" align="top" onclick="if(bfq.style.display=='none'){bfq.style.display=''showbfq.innerText='优质'}

else{bfq.style.display='none'showbfq.innerText='点击更多'}">点击更多</td>

</tr>

<tr>

<td height="80" align="center" name="bfq" id="bfq" style="display:none">aaa</td>

</tr>

</table></td></tr>

<tr><td><table border="1">

<tr>

<td id="showbfq1" height="20" align="top" onclick="if(bfq1.style.display=='none'){bfq1.style.display=''showbfq1.innerText='优质'}

else{bfq1.style.display='none'showbfq1.innerText='点击更多'}">点击更多</td>

</tr>

<tr>

<td height="80" align="center" name="bfq1" id="bfq1" style="display:none">bbb</td>

</tr>

</table></td></tr>

<tr><td><table border="1">

<tr>

<td id="showbfq2" height="20" align="top" onclick="if(bfq2.style.display=='none'){bfq2.style.display=''showbfq2.innerText='优质'}

else{bfq2.style.display='none'showbfq2.innerText='点击更多'}">点击更多</td>

</tr>

<tr>

<td height="80" align="center" name="bfq2" id="bfq2" style="display:none">ccc</td>

</tr>

</table></td></tr>

</table>

一样的,用一个大表格,把它们竖向的框起来。

不太理解你要什么,看看下面这段代码实现的效果是你想要的吗?

<style>div{font-size:12pxcolor:redbackground-color: #EAEAE8border: 1 solid #1892B5padding: 1}</style>

<div id="main1" style="color:blue" onclick="document.all.child1.style.display=(document.all.child1.style.display =='none')?'':'none'" >

+ 主目录1</div>

<div id="child1" style="display:none">

<a href="#">- 子目录1</a><br>

<a href="#">- 子目录2</a><br>

<a href="#">- 子目录3</a><br>

<a href="#">- 子目录4</a>

</div>

<div id="main2" style="color:blue" onclick="document.all.child2.style.display=(document.all.child2.style.display =='none')?'':'none'" >

+ 主目录2 </div>

<div id="child2" style="display:none">

<a href="#">- 子目录1</a><br>

<a href="#">- 子目录2</a><br>

<a href="#">- 子目录3</a>

</div>


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/6166373.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-03-17
下一篇 2023-03-17

发表评论

登录后才能评论

评论列表(0条)

保存