简体   繁体   English

Bootstrap错误消息错误:Bootstrap的JavaScript需要jQuery

[英]Bootstrap error message Error: Bootstrap's JavaScript requires jQuery

I am trying to learn bootstrap and seem to be having a problem setting it up properly. 我正在尝试学习引导程序,似乎在正确设置它时遇到了问题。 I am getting an error: 我收到一个错误:

Line: 8 Error: Bootstrap's JavaScript requires jQuery 行:8错误:Bootstrap的JavaScript需要jQuery

I have checked for this error message on this site and have read several responses but from what I have read it appears I have my setup correct. 我已经在该站点上检查了此错误消息,并且已经阅读了多个响应,但是从我阅读的内容来看,我的安装程序正确无误。 Can anyone see a problem with the code and let me know how I can fix it? 谁能看到代码问题,并让我知道如何解决?

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" 
    Inherits="WebApplication2.WebForm1" %>

<!DOCTYPE html>

<html lang="en">
<head runat="server">
     <!-- metadata -->
    <meta charset="UTF-8"/>

         <!-- responsive -->
            <meta name="viewport" content="width=device-width, initial-scale=1"/>
        <!-- [/] responsive -->

    <!-- [/] metadata -->
    <link href="Scripts/bootstrap.css" rel="stylesheet" />
    <title> Test</title>
    </head>
    <body>
    <form id="form1" runat="server">
        <div>
        </div>
    </form>

<script src="Scripts/jquery-3.3.1.js"></script>
<script src="Scripts/bootstrap.js"></script> 

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

Use the above CDN in general to access Bootstrap Classes and Jquery Functionalities. 通常使用上述CDN来访问Bootstrap类和Jquery功能。

After doing more reading and reviewing all the comments from users I found the issue was my IE browser, for some reason was rendering the page as IE-7. 经过更多阅读并查看了用户的所有评论之后,我发现问题出在我的IE浏览器上,由于某种原因将页面呈现为IE-7。 After adding 添加后

<meta http-equiv="X-UA-Compatible" content="IE=11" />

to my page the problem was solved. 到我的页面,问题已解决。

Better to include jquery migrate Use 更好地包括jquery migration使用

<script src="Scripts/jquery-3.3.1.js"></script>
<script src="https://code.jquery.com/jquery-migrate-3.0.1.js"></script>
<script src="Scripts/bootstrap.js"></script> 

Try this 尝试这个

Change the order of files it should be like below. 更改文件顺序,如下所示。

<script src="js/jquery-1.11.0.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/wow.min.js"></script>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:Bootstrap的JavaScript需要jQuery - Error: Bootstrap's JavaScript requires jQuery 间歇性的“Bootstrap的JavaScript需要jQuery”错误 - Intermittent “Bootstrap's JavaScript requires jQuery” error 未捕获的错误:Bootstrap 的 JavaScript 需要 jQuery - Uncaught Error: Bootstrap's JavaScript requires jQuery 引导JavaScript需要jQuery错误 - bootstrap javascript requires jquery error Bootstrap的javascript需要在客户端登录时出现jquery错误 - Bootstrap's javascript requires jquery error in our client side login 错误:Bootstrap 的 JavaScript 需要 jQuery,使用 Webpack - Error: Bootstrap's JavaScript requires jQuery, using Webpack bootstrap.min.js:6未捕获的错误:Bootstrap的JavaScript需要bootstrap.min.js:6上的jQuery - bootstrap.min.js:6 Uncaught Error: Bootstrap's JavaScript requires jQuery at bootstrap.min.js:6 Bootstrap设置错误:未捕获ReferenceError:未定义jQuery和Uncaught错误:Bootstrap的JavaScript需要jQuery - Bootstrap Set Up Errors: Uncaught ReferenceError: jQuery is not defined & Uncaught Error: Bootstrap's JavaScript requires jQuery bootstrap.js:未捕获的错误:Bootstrap的JavaScript需要jQuery 1.9.1或更高版本,但低于版本3 - bootstrap.js: Uncaught Error: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3 未捕获的错误:Bootstrap 的 JavaScript 需要 electron 应用程序中 bootstrap.min.js:6 处的 jQuery - Uncaught Error: Bootstrap's JavaScript requires jQuery at bootstrap.min.js:6, in an electron app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM