猿问

下拉菜单不显示在导航栏 Laravel 6.0 中

我有我想在我的视图中显示的下拉列表,但它没有部署,我在我的下拉列表中看不到选项,我该如何解决


下面我将index function()显示该视图、视图中的下拉列表部分和我的脚本

Index function()


public function index(Request $request,$correo)

    {

        return view('home.homeRegister')->with('correo',$correo);

    }

看法


!DOCTYPE html>

<html>

  <head>

    <!-- Required meta tags -->

    <meta charset="utf-8">

    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->

    <link href="{{ asset('css/app.css') }}" rel="stylesheet">

    <title>ACAVUCAB</title>

    </head>

<body>

 <nav class="navbar navbar-expand-lg navbar-dark bg-dark  ">

  <div class="container">

   <ul class="navbar-nav mr-auto">

          <!-- Authentication Links -->

          <div class="dropdown">

            <a class="btn btn-secondary dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">

              Dropdown link

            </a>


            <div class="dropdown-menu" aria-labelledby="dropdownMenuLink">

              <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>

  </ul>

 </div>

</nav>

</body>

</html>

脚本


 <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>



慕村9548890
浏览 97回答 2
2回答

慕码人8056858

你能测试一下这段代码吗?也许您忘记添加引导 js 脚本:<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script><script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script><script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>&nbsp; &nbsp; <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>&nbsp; &nbsp; <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"><nav class="navbar navbar-expand-lg navbar-dark bg-dark&nbsp; "><script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script><script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>&nbsp; <div class="container">&nbsp; &nbsp;<ul class="navbar-nav mr-auto">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <!-- Authentication Links -->&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <div class="dropdown">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a class="btn btn-secondary dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dropdown link&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </a>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <div class="dropdown-menu" aria-labelledby="dropdownMenuLink">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a class="dropdown-item" href="#">Action</a>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a class="dropdown-item" href="#">Another action</a>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a class="dropdown-item" href="#">Something else here</a>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>&nbsp; </ul>&nbsp;</div></nav>如果这个答案还不够。请提供更多信息。

元芳怎么了

我把它修好在里面<head><script src="{{ asset('js/app.js') }}" defer></script>&nbsp; &nbsp; <!-- Bootstrap CSS -->&nbsp; &nbsp; <link rel="stylesheet" href="css/bootstrap.min.css"><script>以下<script src="js/bootstrap.min.js"></script>
随时随地看视频慕课网APP
我要回答