gpt4 book ai didi

javascript - 为什么我在使用本地文件时会丢失 Bootstrap 下拉菜单?

转载 作者:太空宇宙 更新时间:2023-11-04 10:59:39 24 4
gpt4 key购买 nike

我已经使用 Bootstrap 大约一年了,它运行良好。但是当我尝试在本地使用这些文件时,结果总是一样的:我的 Navbar 下拉菜单停止下拉。

谁能看出我做错了什么?

<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">

<link rel="apple-touch-icon" href="apple-touch-icon.png">
<!-- Place favicon.ico in the root directory -->

<script src="js/jquery.min.js"></script>

<script src="js/plugins.js"></script>
<script src="js/jquery-ui-1.11.4/jquery-ui.min.js"></script>

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">

<!-- Optional theme -->
<link rel="stylesheet" href="css/bootstrap-theme.min.css">

<!-- Latest compiled and minified JavaScript -->
<script src="js/bootstrap.min.js"></script>

错误是:

wsschedulepolygraphs.php:14 GET http://localhost/dfwit/js/jquery.min.js 
wsschedulepolygraphs.php:17 GET http://localhost/dfwit/js/jquery-ui-1.11.4/jquery-ui.min.js
bootstrap.min.js:6 Uncaught Error: Bootstrap's JavaScript requires jQuery(anonymous function) @ bootstrap.min.js:6
dropdown-enhancement.js:267 Uncaught ReferenceError: jQuery is not defined(anonymous function) @ dropdown-enhancement.js:267
wsschedulepolygraphs.php:434 Uncaught ReferenceError: $ is not defined(anonymous function) @ wsschedulepolygraphs.php:434
wsschedulepolygraphs.php:530 Uncaught ReferenceError: $ is not defined

最佳答案

目录权限不正确会在读取文件时导致 403 和其他访问错误。从命令行检查当前目录的所有者和组:

~$ ls -ld
drwxr-xr-x 2 owner group 4096 Aug 12 19:12 Desktop

资料来源: How to Find Owner and Group of a Directory

https://superuser.com/a/91966

关于javascript - 为什么我在使用本地文件时会丢失 Bootstrap 下拉菜单?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34428427/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com