我的bootstrap下拉菜单出了什么问题?

时间:2017-07-01 12:37:42

标签: php jquery bootstrap-4

每当我点击具有下拉列表的项目时,它都无法工作......有谁知道为什么?这是我第一次使用PHP,我正在尝试做一个库存系统...但我不知道可能是什么问题 这是我的代码

    <!DOCTYPE html>
<html>
<head>
    <title>Servicio de Manejo de Inventarios</title>
    <!-- bootstrap -->
    <link rel="stylesheet" type="text/css" href="assets/bootstrap/css/bootstrap.min.css">
    <!-- bootstrap theme -->
    <link rel="stylesheet" type="text/css" href="assets/bootstrap/css/bootstrap-theme.min.css">
    <!-- Font Awesome -->
    <link rel="stylesheet" type="text/css" href="assets/font-awesome/css/font-awesome.min.css">
    <!-- custom css -->
    <link rel="stylesheet" type="text/css" href="custom/css/custom.css">
    <!-- DataTables-->
    <script type="text/javascript" scr="assets/plugins/datatables/datatables.min.css"></script>
    <!-- file input -->
    <script type="text/javascript" scr="assets/plugins/fileinput/css/fileinput.min.css"></script>
    <!-- jquery -->
    <script type="text/javascript" scr="assets/jquery/jquery.min.js"></script>
    <!-- jqueryui -->
    <link rel="stylesheet" type="text/css" href="assets/jquery-ui/jquery-ui.min.css">
    <script type="text/javascript" scr="assets/jquery-ui/jquery-ui.min.js"></script>
    <!-- bootstrap js -->
    <script type="text/javascript" scr="assets/bootstrap/js/bootstrap.min.js"></script>
</head>
<body>

    <nav class="navbar navbar-default navbar-static-top">
      <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="#">Brand</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
          <ul class="nav navbar-nav">
            <li id="navDashboard"><a href="index.php"> <i class="glyphicon glyphicon-list-alt"></i> Dashboard </a> </li>
            <li id="navBrand"><a href="brand.php"> <i class="glyphicon glyphicon-btc"></i> Marca </a> </li>
            <li id="navCategories"><a href="categories.php"> <i class="glyphicon glyphicon-th-list"></i> Categoria </a> </li>
            <li class="dropdown" id="navOrder">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> <i class="glyphicon glyphicon-shopping-cart"> </i> Ordenes <span class="caret"></span></a>
              <ul class="dropdown-menu">
                    <li id="topNavAddOrder"><a href="orders.php?o=add"><i class="glyphicon glyphicon-plus"> </i>Agregar orden</a></li>
                    <li id="topNavManageOrder"><a href="orders.php?o=manord"> <i class="glyphicon glyphicon-edit"> </i>Administrar ordenes</a></li>
              </ul>
            </li>
            <li id="navReport"><a href="report.php"> <i class="glyphicon glyphicon-check"></i> Reporte </a> </li>
          </ul>
          <ul class="nav navbar-nav navbar-right" id="navSetting">
            <li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> <i class="glyphicon glyphicon-user"></i> <span class="caret"></span></a>
              <ul class="dropdown-menu">
                <li id="topNavSetting"><a href="setting.php"><i class="glyphicon glyphicon-wrench"></i>Setting</a></li>
                <li id="topNavLogout"><a href="logout.php"><i class="glyphicon glyphicon-log-out"></i>Logout</a></li>
              </ul>
            </li>
          </ul>
        </div><!-- /.navbar-collapse -->
      </div><!-- /.container-fluid -->
    </nav>




    <!-- file input -->
    <script type="text/javascript" scr="assets/plugins/fileinput/js/plugins/piexif.min.js"></script> <!--se supone que va "canvas-to-blog.min.js" -->
    <script type="text/javascript" scr="assets/plugins/fileinput/js/plugins/srotable.min.js"></script>
    <script type="text/javascript" scr="assets/plugins/fileinput/js/plugins/purify.min.js"></script>
    <script type="text/javascript" scr="assets/plugins/fileinput/js/fileinput.min.js"></script>
    <!-- datatables js-->
    <script type="text/javascript" scr="assets/plugins/datatables/datatables.min.js"></script>

</body>
</html>

1 个答案:

答案 0 :(得分:0)

因为具有下拉列表的元素的href属性设置为&#34;#&#34;。要解决此问题,请为其指定有效链接,例如<a href="http://google.com" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> <i class="glyphicon glyphicon-user"></i> <span class="caret"></span></a>