Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/448.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/75.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 启动下拉按钮不工作,即使我包括了所有文件_Javascript_Html_Jquery_Css_Twitter Bootstrap - Fatal编程技术网

Javascript 启动下拉按钮不工作,即使我包括了所有文件

Javascript 启动下拉按钮不工作,即使我包括了所有文件,javascript,html,jquery,css,twitter-bootstrap,Javascript,Html,Jquery,Css,Twitter Bootstrap,我的引导下拉按钮不能正常工作,即使我包含了所有通过npm下载的库javascript和popper文件 <!DOCTYPE html> <html lang="en"> <head> <title>three grid </title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1,shr

我的引导下拉按钮不能正常工作,即使我包含了所有通过npm下载的库javascript和popper文件

<!DOCTYPE html>
<html lang="en">
<head>
<title>three grid </title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">

<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<link rel="stylesheet" href="css/bootstrap.min.css">

</head>
<body>
<div class="container">
<br><br><br>
 <div class="dropdown">
  <button class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">
    Dropdown button
  </button>
  <div class="dropdown-menu">
    <a class="dropdown-item" href="#">Action</a>
    <a class="dropdown-item" href="#">Another action</a>
    <a class="dropdown-item" href="#">Something else here</a>
  </div>
</div>
</div>
<script src="js/jquery.min.js type=text/javascript"></script>
<script src="popper/popper.min.js type=text/javascript"></script>
<script src="js/bootstrap.min.js type=text/javascript"></script>

</body>
</html>


三格



下拉按钮
我猜在链接下载的文件时可能会有一些错误,请尝试通过CDN链接引导,然后重试。

检查Js或jQuery文件,它会解决您的问题


三格



下拉按钮
亲爱的,我的问题很简单,当我在浏览器中打开我的代码时,它只会给我一个按钮而不是下拉菜单。你检查过你的JS文件是否正确加载了吗?您是否尝试从浏览器控制台用jQuery加载元素?