您现在的位置是:首页 > 电脑技术查询 > web开发

firefox中iframe改变父窗口url,document.write会失效?解决方案

编辑:chaxungu时间:2022-10-02 23:20:03分类:web开发

firefox中iframe改变父窗口url,document.write会失效?
两个页面,a.html:
<html>
<body>
<script> document.write( 'asdfasdfasfd ') </script>
<a href= "a.html " > go </a>
<iframe src= "b.html " width=400px height=300px > </iframe>

</body>

</html>
b.html:
<html>
<body>
<a href=a.html target=_top > go </a>
</body>
</html>

在IE中正常,firefox中会出现document has no properties的错误

------解决方案--------------------
沒樓主所說的情況;