1.初次使用 vscode, 写一个简单的 html, 里面引入了一个 common.js 文件, 但是在 html 中使用该 js 中的函数时, 却得不到提示
2.代码如下
// js code
function getCurrentFileName() {
console.log('hello');
}
// html code
...
<script>
getCurrentFileName();// 输入函数名时得不到提示或补全
</script>
...
1.初次使用 vscode, 写一个简单的 html, 里面引入了一个 common.js 文件, 但是在 html 中使用该 js 中的函数时, 却得不到提示
2.代码如下
// js code
function getCurrentFileName() {
console.log('hello');
}
// html code
...
<script>
getCurrentFileName();// 输入函数名时得不到提示或补全
</script>
...
9 回答10.2k 阅读
4 回答8.6k 阅读✓ 已解决
7 回答10.7k 阅读
2 回答11.2k 阅读✓ 已解决
6 回答2.4k 阅读
5 回答4.2k 阅读✓ 已解决
4 回答2.5k 阅读✓ 已解决
可以安装这个插件 Path Autocomplete