当前位置: 代码迷 >> JavaScript >> iframe javascript:location.replace(url)路径有关问题
  详细解决方案

iframe javascript:location.replace(url)路径有关问题

热度:159   发布时间:2012-03-30 17:32:09.0
iframe javascript:location.replace(url)路径问题
JScript code

<div class="collapsed"><span>测试菜单</span>
        <b><a target="iFrameMain" href="javascript:document.location.replace('web/a.html')">a.html</a></b>
        <b><a target="iFrameMain" href="javascript:document.location.replace('web/b.html')">b.html</a></b>
</div>
<iframe id="iFrameMain" name="iFrameMain" scrolling="auto" src="" frameborder="0" ></iframe>




a href 路径会重叠(web/web/a.html)
这个怎么处理。


------解决方案--------------------
javascript:document.location.replace('a.html')
不要前缀不行?
  相关解决方案