jquery不会先加载

时间:2016-11-03 16:25:54

标签: javascript jquery html twitter-bootstrap

我的Jquery未加载

<link href="css/bootstrap.css" rel="stylesheet" type="text/css">
<link href="css/bootstrap-theme.css" rel="stylesheet" type="text/css"
<script type="text/javascript" src="js/jquery-3.1.1.min.js"></script>  
<script type="text/javascript" src="js/bootstrap.min.js"></script>

如果我在bootstrap.min.js之后放了jquery,jquery正在加载但是我需要首先加载jquery,当我这样做时,我得到:

  

未捕获错误:Bootstrap的JavaScript需要jQuery(...)

2 个答案:

答案 0 :(得分:9)

使用&gt; 关闭第二行,如下所示:

<script type="text/javascript" src="js/jquery-3.1.1.min.js"></script>  
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="css/bootstrap-theme.css" rel="stylesheet" type="text/css" />

答案 1 :(得分:1)

尝试使用其他订单并关闭链接css:

<script type="text/javascript" src="js/jquery-3.1.1.min.js"></script>  
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="css/bootstrap-theme.css" rel="stylesheet" type="text/css" />