[英]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.