JS file path before adding "/" and do not add "/" There is a difference, please ask why. For example:
<script type= "Text/javascript" src= "/js/ibanner.js" ></script>
<script type= "Text/javascript" src= "Js/ibanner.js" ></script>
Plus "/" is to represent the absolute path, without "/" is to represent the relative path.
Here's an example to illustrate absolute and relative paths
Absolute path:
Assume that there is a domain name www.xxx.com, and the application of the virtual host, the virtual host has a directory, such as WWW, this www is the root directory of the site.
The root directory is decentralized with a file index.html, the absolute path of this file is: http://www.xxx.com/index.html.
Suppose a directory called function is built in the WWW root directory, and then a file info.html is placed in the directory, and the absolute path to the file is http://www.xxx.com/function/info.html.
Relative path
Suppose: The info.html path is: d:/web/www/function/info.html
The index.html path is: d:/web/www/index.html
Writing: <a href = "index.html" > This is a super join </a>
Parent Directory
.. /indicates the directory in which the source file resides
Suppose: The info.html path is: d:/web/www/function/info.html
The index.html path is: d:/web/www/index.html
Writing: <a href = ". /index.html "> This is a super connection </a>
Upper Parent Directory
Suppose: The info.html path is: d:/web/www/function/inc/info.html
The index.html path is: d:/web/www/index.html
Writing: <a href = ". /function/inc/info.html ">info.html</a>
Subordinate Directory
A file that refers to a subordinate directory, directly to the path of the subordinate directory file.
Suppose: The info.html path is: d:/web/www/function/info.html
The index.html path is: d:/web/www/index.html
Writing: <a href = "html/info.html" > This is a hyper-connection </a>.