日期:2014-05-16  浏览次数:20391 次

子页面定位到父页面问题

$(function(){
     alert("--in");
     $("#info tr",window.parent.document).each(function(){
     alert($("tr").html());


为什么我这样做 获取的还是本页面的table呢,用parent.document.getElementByIdx_x("info") 网页会提示我无此方法 求解 。我主页面上面有一个div 里面是iframe 放的子页面 
JavaScript

------解决方案--------------------
本地file浏览不要用chrome测试,无法互访,chrome浏览器iframe parent.document为undefined