# 1. 低版本 IE 瀏覽器 base 標簽無效
> 目前存在問題,在高版本 IE 瀏覽器下,使用兼容模式,base 標簽失效,解決辦法在 head 標簽中增加以下代碼
```
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
```
# 2. 高版本瀏覽器在 javascript 代碼中使用 window.location 時,base 標簽無效,解決辦法自定義方法
```
function href(url){
? ? var base = document.getElementsByTagName('base');
? ? if (base.length > 0) {
? ? ? ? location.href = base[0].href + url;
? ? } else {
? ? ? ? location.href = url;
? ? }
}
// window.location.href 替換為 href
href('aaa/bbb');
```