【发布时间】:2015-05-22 09:34:11
【问题描述】:
我的页面中有这个基本标签:
<base href="http://localhost:8080/application/module/jsp/Vues/">
当我在 Chrome 中测试 location.replace 时,它的行为符合预期,使用基本 url:
location.replace(test)
=> http://localhost:8080/application/module/jsp/Vues/test
但 IE 似乎忽略了基本 URL,而是使用当前位置:
location.replace(test)
=> http://localhost:8080/application/module/jsp/test
任何想法为什么 IE 忽略基本标记?如何让两个浏览器有相同的行为?
【问题讨论】:
标签: javascript html google-chrome internet-explorer url