HTML树形菜单伸缩问题
用下面的代码显示树形目录,但默认是“张开”所有小目录状态,怎么才能默认显示为“收缩”状态呢?<br><SPAN><IMGid="Image_Closed"style="D...
用下面的代码显示树形目录,但默认是“张开”所有小目录状态,怎么才能默认显示为“收缩”状态呢?
<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: inline;">
<SPAN>
<br> <IMG src="pic/m_c.gif" />小目录<br>
</SPAN>
</SPAN>
</SPAN> 展开
<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: inline;">
<SPAN>
<br> <IMG src="pic/m_c.gif" />小目录<br>
</SPAN>
</SPAN>
</SPAN> 展开
2个回答
展开全部
<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>
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>
展开全部
<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>
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>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询