无法使用js文件加载我的js文件,引导程序要求我为Carousel导入

时间:2017-11-26 15:03:36

标签: javascript jquery html twitter-bootstrap

如果我把index.js放在另一个js文件的顶部而不是我的js文件工作但不是carousel功能,如果我把index.js放在底部那么轮播功能工作但不是我的index.js ....任何想法如何解决它。



 alert("I am an alert box!");

h1{


	margin-left:  25%;
	padding-left: 5%;
}
.carousel-item{
	margin-left: 25%;
	margin-top: 10%;
}



body {
    background-color: lightblue;
}

<!DOCTYPE html>
<html>
<head>
	<title>ChrisDWebAPP</title>
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">
	<link rel="stylesheet" type="text/css" href="index.css">
</head>
<h1>Connected To Boot Strap</h1>


<body>

<div id="carouselExampleControls" class="carousel slide" data-ride="carousel">
  <div class="carousel-inner">
    <div class="carousel-item active">
      <img class="d-block w-50" src="https://cdn.pixabay.com/photo/2017/11/06/18/39/apple-2924531_960_720.jpg" alt="First slide">
    </div>
    <div class="carousel-item">
      <img class="d-block w-50" src="https://cdn.pixabay.com/photo/2017/11/06/18/39/apple-2924531_960_720.jpg" alt="Second slide">
    </div>
    <div class="carousel-item">
      <img class="d-block w-50" src="https://cdn.pixabay.com/photo/2017/11/06/18/39/apple-2924531_960_720.jpg" alt="Third slide">
    </div>
  </div>
  <a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
    <span class="carousel-control-prev-icon" aria-hidden="true"></span>
    <span class="sr-only">Previous</span>
  </a>
  <a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next">
    <span class="carousel-control-next-icon" aria-hidden="true"></span>
    <span class="sr-only">Next</span>
  </a>
</div>



<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js" integrity="sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js" integrity="sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ" crossorigin="anonymous"></script>
<script src="index.js" </script>

</body>
</html>
&#13;
&#13;
&#13;

谢谢...

0 个答案:

没有答案