各位大神
在web项目中,ajax中的  url:"http://localhost:8081/myworld/login.htm",  其中  http://localhost:8081/myworld/  为项目的访问路径,那么如何将项目的访问根路径设置为全局变量,我在拼url时可以直接使用,如  url:basePath+"/login.htm",