extjs 部署时动态切换上下文路径
修改index.html
...
<script type="text/javascript">
// 获取首页上下文路径
var basePath = window.location.href;
basePath = basePath.substr(0, basePath.lastIndexOf('index.html'));
// 创建base标签
var base = document.createElement("base");
base.setAttribute("href", basePath);
document.getElementsByTagName('head')[0].appendChild(base);
var Ext = Ext || {};
...