原本頁面中有一 iframe:
<iframe id="ifControl" style="width: 100%;" frameborder="0" height="700px" scrolling="no"></iframe>
通過js賦src的值:window.frames["ifControl"].location.href=“”;
這樣寫IE下是正常的,但在火狐下不顯示。。
解決辦法:
<iframe id="ifControl" name="ifControl" style="width: 100%;" frameborder="0" height="700px" scrolling="no"></iframe>把iframe的id,name都賦值。。
另外:<script>parent.window.location="url"</script>在IE和火狐下通用。
<script>parent.window.location.href("url")</script>在火狐下無效。。