javascript site root

前端 未结 4 1297
一个人的身影
一个人的身影 2021-02-05 23:36

I have this site that I need to find the root folder / plus the actual folder its works out of.

My problem here is that during development i have the folder with in my l

4条回答
  •  渐次进展
    2021-02-05 23:49

    This is what worked for me after the switch clause.

    var root = location.protocol + '//' + location.host + rootFolder;
    

提交回复
热议问题