ASP二维数组

<%if request.Cookies("username")="" then
response.Redirect("admin.asp")
end if%>
<html>
<head>
<%response.charset="utf-8"%>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>我的菜单</title>
<STYLE type=text/css>
BODY {
 BACKGROUND: #799ae1; MARGIN: 0px; FONT: 9pt 宋体;
 SCROLLBAR-FACE-COLOR: #799ae1;
}
TABLE {
 BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px
}
TD {
 FONT: 12px 宋体
}
IMG {
 BORDER-RIGHT: 0px; BORDER-TOP: 0px; VERTICAL-ALIGN: bottom; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px
}
A {
 FONT: 12px 宋体; COLOR: #215dc6; TEXT-DECORATION: none
}
A:hover {
 COLOR: #428eff
}
.sec_menu {
 BORDER-RIGHT: white 1px solid; BACKGROUND: #d6dff7; OVERFLOW: hidden; BORDER-LEFT: white 1px solid; BORDER-BOTTOM: white 1px solid;text-align:center;padding-top:6px;
}
.menu_title {
 
}
.menu_title SPAN {
 FONT-WEIGHT: bold;
 LEFT: 8px;
 COLOR: #215dc6;
 POSITION: relative;
 TOP: 2px;
 visibility: visible;
}
.menu_title2 {
 
}
.menu_title2 SPAN {
 FONT-WEIGHT: bold; LEFT: 8px; COLOR: #428eff; POSITION: relative; TOP: 2px
}

</STYLE>
<SCRIPT language=javascript>
function menuShow(obj,maxh,obj2)
{
  if(obj.style.pixelHeight<maxh)
  {
    obj.style.pixelHeight+=maxh/10;
 obj.filters.alpha.opacity+=20;
 obj2.background="images/pics/title_bg_hide.gif";
    if(obj.style.pixelHeight==maxh/10)
   obj.style.display='block'
 myObj=obj;
 myMaxh=maxh;
 myObj2=obj2;
 setTimeout('menuShow(myObj,myMaxh,myObj2)',Ƌ');
  }
}
function menuHide(obj,maxh,obj2)
{
  if(obj.style.pixelHeight>0)
  {
    if(obj.style.pixelHeight==maxh/5)
   obj.style.display='none'
    obj.style.pixelHeight-=maxh/5;
 obj.filters.alpha.opacity-=10;
 obj2.background="images/pics/title_bg_show.gif";
 myObj=obj;
 myMaxh=maxh
 myObj2=obj2;
 setTimeout('menuHide(myObj,myMaxh,myObj2)',Ƌ');
  }
  else
    if(whichContinue)
   whichContinue.click();
}
function menuChange(obj,maxh,obj2)
{
  if(obj.style.pixelHeight)
  {
    menuHide(obj,maxh,obj2);
 whichOpen=''
 whichcontinue=''
  }
  else
    if(whichOpen)
 {
   whichContinue=obj2;
      whichOpen.click();
 }
 else
 {
   menuShow(obj,maxh,obj2);
   whichOpen=obj2;
   whichContinue=''
 }
}
</SCRIPT>

</head>
<body leftmargin="0" topmargin="0" bgcolor="#FF9800">
<!--
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=left border=0>
<TBODY>
  <TR>
    <TD vAlign=top>
 -->
<TABLE cellSpacing=0 cellPadding=0 width=158 align=center>
<TBODY>
<TR style="CURSOR: hand">
<TD vAlign=bottom height=42>
<IMG height=38 src="images/pics/title.gif" width=158>
</TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=158 align=center>
<TBODY>
<TR style="CURSOR: hand">
<TD class=menu_title onMouseOver="this.className='menu_title2'"
onmouseout="this.className='menu_title'"
background="images/pics/title_bg_quit.gif"
height=25>
<SPAN>
<a href="manage.asp" target="_top"><B>管理首页</B></A>/<a href="logout.asp" target="_parent"><B>退出</B></A>
</SPAN>          
</TD>
</TR>
</TBODY>
</TABLE>
<%
'''''''''''by Victor.Yan 2007,9,28'''''''''
''''''''''''''''''''''''''
''''''''''''''''''''''''''
''''''''''''''MyMenu="主类别^第一子类别^第二子类别^第一子类别对应链接^第二子类别对应链接|第二主类别^..^..^..^..|.....''''''''''''
''''''''''''''''''''''''''
''''''''''''''''''''''''''
MyMenu="新闻发布^发布新闻^管理新闻^news/newsadd.asp^news/manage_news.asp|产品发布^发布产品^管理发布^product/product_add.asp^product/manage_product.asp|管理员^管理员管理^添加管理员^pwd_cng/mng_admin.asp^pwd_cng/add_admin.htm|"

dim TwoArray(10,10)
Array1=split(MyMenu,"|")
for i=0  to ubound(Array1)-1
Array2=split(Array1(i),"^")
for j=0 to ubound(Array2)
TwoArray(i,j)=Array2(j)
next
next
%>
<%for i=0  to ubound(Array1)-1%>
<TABLE cellSpacing=0 cellPadding=0 width=158 align=center>
<TBODY>
<TR style="CURSOR: hand">
<TD class=menu_title id=menuTitle<%=i%>
onmouseover="this.className='menu_title2'"
onclick=menuChange(menu<%=i%>,50,menuTitle<%=i%>);
onmouseout="this.className='menu_title'"
background="images/pics/title_bg_show.gif"
height=25><SPAN><%=TwoArray(i,0)%></SPAN> </TD>
</TR>
<TR>
<TD align="center" >
<DIV class=sec_menu id=menu<%=i%>
style="DISPLAY: none; FILTER: alpha(Opacity=0); WIDTH: 158px; HEIGHT: 0px">
<TABLE  cellSpacing=2
cellPadding=0 width=135 align=center>
<TR>
<TD height=20><a href="<%=TwoArray(i,3)%>" target="BoardList"><%=TwoArray(i,1)%></a></TD>
</TR>
<TBODY>
<TR>
<TD height=20><a href="<%=TwoArray(i,4)%>" target="BoardList"><%=TwoArray(i,2)%></a></TD>
</TR>
</TBODY>
</TABLE>
</DIV>
</TD>
</TR>
</TBODY>
</TABLE>
<%nexT%>

<SCRIPT language=javascript>
var whichOpen="";
var whichContinue=''
</SCRIPT>
<TABLE width=158 height="30" align=center cellPadding=0 cellSpacing=0>
<TBODY>
<TR style="CURSOR: hand">
<TD class=menu_title id=menuTitle
onmouseover="this.className='menu_title2'"
onclick=menuChange(menu,30,menuTitle);
onmouseout="this.className='menu_title'"
background="images/pics/title_bg_show.gif"
height=25><SPAN>系统信息</SPAN> </TD>
</TR>
<TR>
<TD height="30" valign="middle">
<DIV class=sec_menu id=menu
style="FILTER: alpha(Opacity=100); WIDTH: 158px; HEIGHT:30px">
上海公司
</DIV>
</TD>
</TR>
</TBODY>
</TABLE>
</body>  
</html>

    A+
发布日期:2007年09月29日  所属分类:未分类

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: