我的网页在Chrome,Internet Explorer和JSFiddle中运行良好,但在Mozilla中打开时,除了链接到网站的链接或脚本标签外,它不会读取任何链接或脚本标记,即jquery。在开发人员工具中,它读取jquery但没有其他JS,并且说没有应用于网页的样式。
<!DOCTYPE html>
<html>
<head>
<title>Word Master</title>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="C:/Users/Thomas/OneDrive/Documents/workPlease/WMstyle.css">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="https://code.jquery.com/color/jquery.color-2.1.0.js"></script>
<script type="text/javascript" src="C:/Users/Thomas/OneDrive/Documents/workPlease/WMfunctions.js"></script>
<script type="text/javascript" src="C:/Users/Thomas/OneDrive/Documents/workPlease/errorCheck.js"></script>
<script type="text/javascript" src="C:/Users/Thomas/OneDrive/Documents/workPlease/WMpopups.js"></script>
<script type="text/javascript" src="C:/Users/Thomas/OneDrive/Documents/workPlease/WMeasy.js"></script>
</head>
我尝试使用UTF-8编码保存所有这些内容,然后将@charset "UTF-8";
添加到我的css顶部。
答案 0 :(得分:4)
因为您使用的是filesystem
路径:
C:/Users/Thomas/OneDrive/Documents/workPlease/WMeasy.js
应该是绝对的
/workPlease/WMeasy.js
或亲戚
WMeasy.js