Where you have to place the JS link code in HTML?
1. Link Direct JS File
Note: Replace the “myscripts.js” file name with your JS file name.
2. Link File Inside Folder
Note: Replace folder name with your actual folder’s name and myscript.js with your original JS file.
3. If HTML and JS Both Inside Folder
If your HTML file is not in the root or it’s inside the folder and js file is in another folder. Then you have to write the script like below.
“../” will push you inside the parent directory. So, the server can get access to the JS file and run on the client side.
I hope you will like this article. If you like it, please share it with your friends.