JS获取项目根路径的示例

在JavaScript中,你可以通过以下方式获取项目的根路径:

```javascript

// 使用document.domain来获取根域名

var rootPath = document.domain + "