菜单切换
FACESOHO知行者
心灵
记录
远方
源代码:
保存
点击运行
<script runat="server"> Sub Page_Load(sender As Object, e As EventArgs) if check1.Checked then panel1.Visible=false else panel1.Visible=true end if End Sub </script>
<!DOCTYPE html> <html> <body> <form runat="server"> <asp:Panel id="panel1" runat="server" BackColor="#ff0000" Height="100px" Width="100px"> Hello World! </asp:Panel> <asp:CheckBox id="check1" Text="Hide Panel control" runat="server"/> <br><br> <asp:Button Text="Reload" runat="server" /> </form> </body> </html>
运行结果
Hello World!
Hide Panel control