`

IE js中使用window.location时会忽略base href值

阅读更多

来源: http://blog.csdn.net/kjb000/article/details/7913867

 

IE的js 中使用Window.location时会忽略base href值 

这样写可以解决:

window.location = document.getElementsByTagName("base")[0].getAttribute("href")+ "loc";

 

 

获得 base也可以用:

alert("base="+$("#base").attr("href"));

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics