Help with directories
I am running a java script in an .htm file located at /Dir1/Dir2/Dir3/testing.ht开发者_如何学Gom. Where it says script src=" " What would I put in the quotations to have it read from my file located at /Dir1/Test1/example.txt
Thanks
You can put: /Dir1/Test1/example.txt
The slash at the beginning tells the browser use the base directory as a point of reference when looking for files.
You can also do ../../Test1/example.txt
which will look at the directory structure relative to your testing.htm file location.
Or relative: ../../Test1/example.txt
精彩评论