gpt4 book ai didi

jquery - Bootstrap 下拉菜单问题 ASP.Net VB

转载 作者:行者123 更新时间:2023-11-28 06:09:11 24 4
gpt4 key购买 nike

我目前正在尝试创建一个模板,允许使用 Bootstrap 菜单和网格系统进行响应式设计。但是,我获得了最新的 LESS 文件并编译了完整版本的 JS。然而,这无法打开菜单中的下拉菜单,而且在移动模式大小时也不会打开菜单下拉菜单。

如果其他人在设置时遇到此问题,我需要帮助来弄清楚为什么我无法正确加载代码!

页面如下:

<%@ Master Language="VB" AutoEventWireup="false" CodeBehind="Main.master.vb" Inherits="Template.Main" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />

<link href="Content/bootstrap.css" rel="stylesheet" />
<title></title>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<script src="Scripts/jquery-2.2.1.js"></script>
<script src="Scripts/bootstrap.js"></script>

<nav class="navbar navbar-default">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Brand</a>
</div>

<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active"><a href="google.com">Link <span class="sr-only">(current)</span></a></li>
<li><a href="Redirect.aspx">Redirect</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li role="separator" class="divider"></li>
<li><a href="#">Separated link</a></li>
<li role="separator" class="divider"></li>
<li><a href="#">One more separated link</a></li>
</ul>
</li>
</ul>
<form class="navbar-form navbar-left" role="search">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search"/>
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
<ul class="nav navbar-nav navbar-right">
<li><a href="#">Link</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li role="separator" class="divider"></li>
<li><a href="#">Separated link</a></li>
</ul>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>

<asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server">
<%-- Start <row> then <col> for pages --%>
</asp:ContentPlaceHolder>
<form id="form1" runat="server">
<div>

<div class="container">

<%-- Holds the entire Grid--%>
<div class="row">
<%-- Row needed per columns--%>
<div class="col-sm-12">

</div>
</div>
</div>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
<asp:ContentPlaceHolder ID="ContentPlaceHolder3" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>

最佳答案

我找到了答案,以防其他人遇到这个问题。我的电话不包括 type="text/javascript"。一旦添加进去,它们就会像魔术一样工作。为忽略的错误感觉有点傻

关于jquery - Bootstrap 下拉菜单问题 ASP.Net VB,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36270184/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com