Compiler: VS Code
My file directory of my open folder is on D drive, I tried to show a picture which in E drive by using absolute path.
In the index.html file, my part code is:
but it cannot shows in browser.
It shows like this:
But if I open this html file locally, the image is displayed normally.
This means that my compiler VSCODE can’t open absolute paths, so I need a solution.
I tried the first method:
Add the file protocol in script, but it doesn’t work:
New contributor
jojo_zhouzhou is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.