开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜