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>

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM