MasterPage.master

Source
版权声明: https://blog.csdn.net/eds124/article/details/85778210
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>

    <script type="text/javascript">
        function show(s) {
            o = document.getElementById(s);
            if (o.style.display == "") {
                o.style.display = "none";
                return;
            }
            o.style.display = "";
        }
</script>

</head>
<body style="background-color: DarkSeaGreen;">
    <form id="form1" runat="server">
    <div style="background-color: Silver; height: 100px;">
    </div>
    <div>
        <ul style="float: left; width: 150px; text-align: center; list-style: none;">
            <li onclick="show('a')" style="background-color: LightCoral;"><a href="#">菜单</a></li>
            <li id='a' style="display: none; background-color: LightPink;">
                <ul style="list-style: none;">
                    <li>菜单</li>
                    <li>菜单</li>
                    <li>菜单</li>
                    <li>菜单</li>
                </ul>
            </li>
            <li onclick="show('b')" style="background-color: LightGreen;"><a href="#">菜单</a></li>
            <li id='b' style="display: none; background-color: GreenYellow;">
                <ul style="list-style: none">
                    <li>菜单</li>
                    <li>菜单</li>
                    <li>菜单</li>
                    <li>菜单</li>
                </ul>
            </li>
            <li onclick="show('c')" style="background-color: LightSeaGreen;"><a href="#">菜单</a></li>
            <li id='c' style="display: none; background-color: LightBlue;">
                <ul style="list-style: none;">
                    <li>菜单</li>
                    <li>菜单</li>
                    <li>菜单</li>
                    <li>菜单</li>
                </ul>
            </li>
            <li onclick="show('d')" style="background-color: Moccasin;"><a href="#">菜单</a></li>
            <li id='d' style="display: none; background-color: LightYellow">
                <ul style="list-style: none;">
                    <li>菜单</li>
                    <li>菜单</li>
                    <li>菜单</li>
                    <li>菜单</li>
                </ul>
            </li>
        </ul>
        <a>asdfasf</a> <a>asdfasf</a> <a>asdfasf</a> <a>asdfasf</a> <a>asdfasf</a>
        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
        </asp:ContentPlaceHolder>
    </div>
    </form>
</body>
</html>