当我单击选项卡配置文件,然后更改li类时,我无法将li类(主页)从“活动”更改为无(或其他类)配置文件)从配置文件激活时,从无到'有效'。如何将li类从活动更改为无
这里是我的代码:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<asp:PlaceHolder runat="server">
<%-- Style Section --%>
<%: Styles.Render("~/bundles/Css") %>
</asp:PlaceHolder>
<script type="text/javascript">
function openHome() {
location.href = "Home.aspx";
}
function openProfile() {
location.href = "Profile.aspx";
}
</script>
<asp:ContentPlaceHolder ID="StyleSection" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<br />
<div class="container">
<div class="jumbotron">
<h1>
BANNER</h1>
</div>
</div>
<!-- MENU START -->
<ul class="nav nav-tabs">
<li class="active"><a href="#home" data-toggle="tab" onclick="openHome();">Home</a></li>
<li><a href="#profile" data-toggle="tab" onclick="openProfile();">Profile</a></li>
</ul>
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="home">
</div>
<div class="tab-pane fade" id="profile">
</div>
</div>
<%-- Script Section --%>
<%: Scripts.Render("~/bundles/jQuery") %>
<asp:ContentPlaceHolder ID="ContentSection" runat="server">
</asp:ContentPlaceHolder>
<asp:ContentPlaceHolder ID="ScriptSection" runat="server">
</asp:ContentPlaceHolder>
</form>
</body>
</html>
有人能帮助我吗?我尝试了类似的解决方案,我发现在stackoverflow但无法完成工作。非常感谢。
请把你的jQuery代码放在这里。 – 2014-10-02 10:40:03
不是[标签:asp-classic]。 – Lankymart 2014-10-02 11:04:01
其实这个原始页面是一个.aspx页面。但是当我发布时,我删除了asp内容,因为我认为这与我的问题无关。 – user1832038 2014-10-02 11:10:33