gpt4 book ai didi

Javascript 文件无法在 github 页面上运行

转载 作者:行者123 更新时间:2023-11-28 13:00:20 25 4
gpt4 key购买 nike

我能够在本地计算机上加载我的 javascript 文件。但在 github 页面上,它不起作用。

我已将该文件包含在index.html中,如下所示

<script src="script.js" type="text/JavaScript"/>

网站是https://abhikulshrestha22.github.io./

代码位于 https://github.com/abhikulshrestha22/abhikulshrestha22.github.io

如有任何帮助,我们将不胜感激。提前致谢。

编辑 1我尝试在我的 javascript 文件中添加以下代码来检查其是否工作,但它无法在 github 页面上工作并且在本地工作。

$(document).ready(function(){
alert("hi");}

最佳答案

试试这个

<script src="script.js" type="text/javascript"></script>

使用结束script标签。

有关更多信息,请查看此 answer .

关于Javascript 文件无法在 github 页面上运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51261710/

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