ITeye博客

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

laiahu · 2014-03-04 17:28 · web前端 · Web前端 · Markdown

来源: 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"));

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。