asp中树形菜单设默认展开,怎么设置默认关闭
部分代码..数字超了。。有愿意帮忙的朋友可以留QQ或者邮箱我给全部代码<style>.hidden{display:none;}--></style>----------...
部分代码..数字超了。。有愿意帮忙的朋友可以留QQ或者邮箱 我给全部代码
<style>
.hidden{ display:none;}
-->
</style>
---------------------------------------------------------------------------------------------
<%
dim shownav
shownav=request.QueryString("shownav")
%>
<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td height="29">
<div align="left">
<span id="trigFold"><a href="javascript:foldAll()" class="w"><img src="images/tree/plus.gif" alt="全部展开" width="16" height="16" border="0" align="absmiddle">全部展开</a></span>
</div>
</td>
</tr>
<script language="javascript">
function showHide(obj){
if(document.getElementById(obj).style.display=="none"){
document.getElementById(obj).style.display="block";
}
else{
document.getElementById(obj).style.display="none";
}
}
function unfold(){
for(i=0;i<30;i++){
var s=(i<10?("0"+i):(i+""));
if(exitsDiv("d"+s)){
document.getElementById("d"+s).style.display="none";
}
}
document.getElementById("trigFold").innerHTML='<a href="javascript:foldAll()" class="w"><img src="images/tree/plus.gif" alt="全部展开" width="16" height="16" border="0" align="absmiddle">全部展开</a>'
}
function foldAll(){
for(i=0;i<30;i++){
var s=(i<10?("0"+i):(i+""));
if(exitsDiv("d"+s)){
document.getElementById("d"+s).style.display="block";
}
}
document.getElementById("trigFold").innerHTML='<a href="javascript:unfold()" class="w"><img src="images/tree/minus.gif" alt="全部折叠" width="16" height="16" border="0" align="absmiddle">全部折叠</a>'
}
</script>
</body>
</html>
<%
call connclose()
%> 展开
<style>
.hidden{ display:none;}
-->
</style>
---------------------------------------------------------------------------------------------
<%
dim shownav
shownav=request.QueryString("shownav")
%>
<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td height="29">
<div align="left">
<span id="trigFold"><a href="javascript:foldAll()" class="w"><img src="images/tree/plus.gif" alt="全部展开" width="16" height="16" border="0" align="absmiddle">全部展开</a></span>
</div>
</td>
</tr>
<script language="javascript">
function showHide(obj){
if(document.getElementById(obj).style.display=="none"){
document.getElementById(obj).style.display="block";
}
else{
document.getElementById(obj).style.display="none";
}
}
function unfold(){
for(i=0;i<30;i++){
var s=(i<10?("0"+i):(i+""));
if(exitsDiv("d"+s)){
document.getElementById("d"+s).style.display="none";
}
}
document.getElementById("trigFold").innerHTML='<a href="javascript:foldAll()" class="w"><img src="images/tree/plus.gif" alt="全部展开" width="16" height="16" border="0" align="absmiddle">全部展开</a>'
}
function foldAll(){
for(i=0;i<30;i++){
var s=(i<10?("0"+i):(i+""));
if(exitsDiv("d"+s)){
document.getElementById("d"+s).style.display="block";
}
}
document.getElementById("trigFold").innerHTML='<a href="javascript:unfold()" class="w"><img src="images/tree/minus.gif" alt="全部折叠" width="16" height="16" border="0" align="absmiddle">全部折叠</a>'
}
</script>
</body>
</html>
<%
call connclose()
%> 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询