PHP Write Web Project
Write a Web project, the page JS is separate to put out in a JS file is better, or directly written in the HTML page is better? What are the pros and cons?
Php?js? Web HTML PHP JS
------Solution--------------------
In any case, demand is always the first place!
Now that you have used the path in JS, and you are not willing to change to a relative path
Is it not necessary to discuss the built-in or the outreach?
Of course, you can also embed the standalone JS file as a sub-template into the main template
------Solution--------------------
You can create a dedicated path to the JS file, which defines all the path variables, and other JS files using this file to define the path variable. Then this special storage path JS file before the other JS files can be introduced.
As defined Path.js
Inside the definition of var filepath= "* * *";
The filepath is then used as a path in other files.
When used, it is defined in the page: