How does vscode prompt functions and variables in js introduced by < script src= "> < / script >

1. Using vscode, to write a simple html, for the first time introduces a common.js file, but when you use the functions in the js in html, you don"t get a prompt

2. The code is as follows

// js code
function getCurrentFileName() {
    console.log("hello");
}
// html code
...
<script>
    getCurrentFileName();// 
</script>
...

you can install this plug-in Path Autocomplete


windows system pit, sometimes prompt, sometimes not prompt


I don't know if installing the extension can solve it, if so, please let me know.
my < script > < / scritp > in html < / scritp > writes the length of the array without prompts.

Menu