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"));

你可能感兴趣的:(ie js base)