我在网站上使用了引导程序,切换按钮在计算机浏览器上有效,但在移动浏览器上无效

这是代码:

 <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/styles.css">
    <link rel="stylesheet" href="css/bootstrap-multiselect.css">
    <link href="css/bootstrap-select.min.css" rel="stylesheet" />
    <link href="https://code.jquery.com/ui/1.12.0/themes/smoothness/jquery-ui.css" rel="stylesheet"/>
    <link rel="stylesheet" href="https://rawgit.com/trentrichardson/jQuery-Timepicker-Addon/master/dist/jquery-ui-timepicker-addon.min.css">
    <link href="css/lightbox.css" rel="stylesheet" />
    <link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico"  />

    <nav class="navbar navbar-default">
        <div class="container-fluid">
          <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar4">
              <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="main.php"><img src="img/t-square-logo-Final.png" alt="T-square" class="tslogo"/></a>
        </div>
        <div id="navbar4" class="navbar-collapse collapse">
        <ul class="nav navbar-nav">
          <li class="active"><a href="main.php">Home</a></li>
          <li><a href="dms.php">DMS</a></li>
          <li><a href="main.php?action=backup">Backup</a></li>
          <li><a href="logout.php">LogOut</a></li>
        </ul>
      </div>
      </div>
    </nav>

<link rel="stylesheet" href="css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>


我尝试做here
但是我仍然有同样的问题

任何人都可以帮助解决我的问题?

最佳答案

您的脚本:bootstrap.min.js未加载。当我在项目中删除此文件时,切换按钮将停止工作。

您可以验证文件是否正确加载吗?

10-08 03:40