欢迎光临
我们一直在努力

VB.NET实现Winodws式隐现菜单-.NET教程,VB.Net语言

建站超值云服务器,限时71元/月

主要是通过panel和imagebutton两个控件实现,很简单.

<script language="vb" runat="server">

sub button1_click(sender as object, e as imageclickeventargs)

if mypanel1.visible = true then

mypanel1.visible = false

sbmr.imageurl="images/sb_show.gif"

else

mypanel1.visible = true

sbmr.imageurl="images/sb_hide.gif"

end if

end sub

sub button2_click(sender as object, e as imageclickeventargs)

if mypanel2.visible = true then

mypanel2.visible = false

bjmr.imageurl="images/bj_show.gif"

else

mypanel2.visible = true

bjmr.imageurl="images/bj_hide.gif"

end if

end sub

sub button3_click(sender as object, e as imageclickeventargs)

if mypanel3.visible = true then

mypanel3.visible = false

bjkc.imageurl="images/kc_show.gif"

else

mypanel3.visible = true

bjkc.imageurl="images/kc_hide.gif"

end if

end sub

sub button4_click(sender as object, e as imageclickeventargs)

if mypanel4.visible = true then

mypanel4.visible = false

bjrk.imageurl="images/rk_show.gif"

else

mypanel4.visible = true

bjrk.imageurl="images/rk_hide.gif"

end if

end sub

sub button5_click(sender as object, e as imageclickeventargs)

if mypanel5.visible = true then

mypanel5.visible = false

bjck.imageurl="images/ck_show.gif"

else

mypanel5.visible = true

bjck.imageurl="images/ck_hide.gif"

end if

end sub

sub button6_click(sender as object, e as imageclickeventargs)

if mypanel6.visible = true then

mypanel6.visible = false

bjjh.imageurl="images/jh_show.gif"

else

mypanel6.visible = true

bjjh.imageurl="images/jh_hide.gif"

end if

end sub

sub button7_click(sender as object, e as imageclickeventargs)

if mypanel7.visible = true then

mypanel7.visible = false

bjqt.imageurl="images/qt_show.gif"

else

mypanel7.visible = true

bjqt.imageurl="images/qt_hide.gif"

end if

end sub

</script>

<html>

<head>

<title>左边框</title>

<meta http-equiv="content-type" content="text/html; charset=gb2312">

<style type="text/css">

<!–

body {

margin-left: 0px;

margin-top: 0px;

margin-right: 0px;

margin-bottom: 0px;

background-color: #cfeffa;

}

body,td,th {

color: #000066;

}

.style4 {color: #ffffff}

a:link {

color: #000066;

text-decoration: none;

}

a:visited {

text-decoration: none;

color: #000066;

}

a:hover {

text-decoration: none;

color: #000066;

}

a:active {

text-decoration: none;

color: #000066;

}

–>

</style></head>

<body>

<form runat="server">

<asp:imagebutton runat="server" id="sbmr" imageurl="images/sb_show.gif" onclick="button1_click" /><br>

<asp:panel runat="server" id="mypanel1" horizontalalign="left" visible = "false">

<table width="150" border="1" cellpadding="0" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#a7d2ed" bgcolor="#cfeffa">

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center"><a href="sbmr/addsbmr.aspx" target="mainframe">增加</a></div></td>

</tr>

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center">修改</div></td>

</tr>

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center"><a href="sbmr/sbmr.aspx" target="mainframe">查询</a></div></td>

</tr>

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center">删除</div></td>

</tr>

</table>

</asp:panel>

<asp:imagebutton runat="server" id="bjmr" imageurl="images/bj_show.gif" onclick="button2_click" /><br>

<asp:panel runat="server" id="mypanel2" horizontalalign="left" visible = "false">

<table width="150" border="1" cellpadding="0" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#a7d2ed" bgcolor="#cfeffa">

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center"><a href="bjmr/add.aspx" target="mainframe">增加</a></div></td>

</tr>

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center"><a href="bjmr/edit.aspx" target="mainframe">修改</a></div></td>

</tr>

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center"><a href="bjmr/search.aspx" target="mainframe">查询</a></div></td>

</tr>

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center">删除</div></td>

</tr>

</table>

</asp:panel>

<asp:imagebutton runat="server" id="bjkc" imageurl="images/kc_show.gif" onclick="button3_click" /><br>

<asp:panel runat="server" id="mypanel3" horizontalalign="left" visible = "false">

<table width="150" border="1" cellpadding="0" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#a7d2ed" bgcolor="#cfeffa">

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center"><a href="bjkc/bjkc.aspx" target="mainframe">查询</a></div></td>

</tr>

</table>

</asp:panel>

<asp:imagebutton runat="server" id="bjrk" imageurl="images/rk_show.gif" onclick="button4_click" /><br>

<asp:panel runat="server" id="mypanel4" horizontalalign="left" visible = "false">

<table width="150" border="1" cellpadding="0" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#a7d2ed" bgcolor="#cfeffa">

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center">增加</div></td>

</tr>

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center">修改</div></td>

</tr>

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center">查询</div></td>

</tr>

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center">删除</div></td>

</tr>

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center">统计</div></td>

</tr>

</table>

</asp:panel>

<asp:imagebutton runat="server" id="bjck" imageurl="images/ck_show.gif" onclick="button5_click" /><br>

<asp:panel runat="server" id="mypanel5" horizontalalign="left" visible = "false">

<table width="150" border="1" cellpadding="0" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#a7d2ed" bgcolor="#cfeffa">

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center">增加</div></td>

</tr>

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center">修改</div></td>

</tr>

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center">查询</div></td>

</tr>

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center">删除</div></td>

</tr>

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center">统计</div></td>

</tr>

</table>

</asp:panel>

<asp:imagebutton runat="server" id="bjjh" imageurl="images/jh_show.gif" onclick="button6_click" /><br>

<asp:panel runat="server" id="mypanel6" horizontalalign="left" visible = "false">

<table width="150" border="1" cellpadding="0" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#a7d2ed" bgcolor="#cfeffa">

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center"><a href="bjjh/ydjh.aspx" target="mainframe">应订</a></div></td>

</tr>

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center"><a href="bjjh/yjjh.aspx" target="mainframe">应交</a></div></td>

</tr>

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center"><a href="bjjh/search.aspx" target="mainframe">查询</div></a></td>

</tr>

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center">增加</div></td>

</tr>

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center">删除</div></td>

</tr>

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center">修改</div></td>

</tr>

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center">统计</div></td>

</tr>

</table>

</asp:panel>

<asp:imagebutton runat="server" id="bjqt" imageurl="images/qt_show.gif" onclick="button7_click" /><br>

<asp:panel runat="server" id="mypanel7" horizontalalign="left" visible = "false">

<table width="150" border="1" cellpadding="0" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#a7d2ed" bgcolor="#cfeffa">

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center">其他[1]</div></td>

</tr>

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center">其他[2]</div></td>

</tr>

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center">其他[3]</div></td>

</tr>

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center">其他[4]</div></td>

</tr>

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center">其他[5]</div></td>

</tr>

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center">其他[6]</div></td>

</tr>

<tr>

<td onmouseout="this.style.backgroundcolor=" onmouseover="this.style.backgroundcolor=#ffcccc"><div align="center">其他[7]</div></td>

</tr>

</table>

</asp:panel>

</form>

</body>

</html>

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » VB.NET实现Winodws式隐现菜单-.NET教程,VB.Net语言
分享到: 更多 (0)

相关推荐

  • 暂无文章