window.frames["Iframe1"].document.location兼容问题

 

在ie中使用window.frames["Iframe1"].document.location="";无任何问题,可在谷歌中出现location未定义错误

其真正原因还在浏览器的内核不一样,参照:http://blog.csdn.net/lzy_1515/article/details/6045629

所以将iframe的id和name设成一样的即可

<iframe frameborder="0" id="Iframe1" name="Iframe1" scrolling="yes" src="/maintenance/vehicle/EvaluationImgUrl.aspx"
                        style="visibility: inherit; width: 319px; z-index: 1; height: 350px;"></iframe>

 

 

posted @ 2013-03-06 11:21  Uoolo  阅读(7172)  评论(0编辑  收藏  举报