Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/400.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/80.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 无法从github主机正确加载文件_Javascript_Html_Css_Github_Hosting - Fatal编程技术网

Javascript 无法从github主机正确加载文件

Javascript 无法从github主机正确加载文件,javascript,html,css,github,hosting,Javascript,Html,Css,Github,Hosting,我试图通过github.com()让我的计算器网站正常工作 当我从本地存储中打开索引文件时,它会工作,但当我尝试访问网站时,它只会显示 我假设css和javascript没有加载,但我不知道为什么 我试过更改目录 <link rel="stylesheet" type="text/css" href="./calc.css"> <script src="./calc.js"></script> 文件名正确。请检查路径: 您没有index.

我试图通过github.com()让我的计算器网站正常工作 当我从本地存储中打开索引文件时,它会工作,但当我尝试访问网站时,它只会显示

我假设css和javascript没有加载,但我不知道为什么

我试过更改目录

    <link rel="stylesheet" type="text/css" href="./calc.css">
    <script src="./calc.js"></script>


文件名正确。

请检查路径:
您没有
index.html
文件,因此当您请求时,GitHub将读取
README.md
,但当您在访问它时,它可以正常工作。

谢谢!我应该将主文件更改为index.html还是更改github上的url。com@CodingOni我会将其改为index.html-如果解决了您的问题,请将答案标记为解决方案。