在html上包含js文件 [英] include js file on html

查看:89
本文介绍了在html上包含js文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

起初,我为我的英语感到很抱歉:))

At first, I'm sorry about my English :))

当我尝试在index.html上包含文件.js时遇到一些问题

I had some problems when i try to include file .js on index.html

<script src "../src/man/js/Generator.js"> </script>

但是当我按F12进行调试时,出现如下错误: 无法从source/src/man/js/Generator.js加载'../src/man/js/Generator.js'" 这是文件的结构:

but when i press F12 for debug, i get an error like: "failed to load '../src/man/js/Generator.js' from source/src/man/js/Generator.js" this is file's structure:

那我该如何处理呢?

推荐答案

您缺少=:

<script src="../src/main/js/Generator.js"></script>

这篇关于在html上包含js文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆