2012年3月15日

javascript获取iframe框架中加载的页面document对象

摘要: javascript获取iframe框架中,加载的页面document对象因为浏览器安全限制,对跨域访问的页面,其document对象无法读取、设置属性 function getDocument(iframe) { var Doc; try{ Doc = iframe.contentWindow.document;// For IE5.5 and IE6 } catch(ex){} if(!Doc) { Doc = iframe.contentDocument;// For NS6 } return Doc; } 阅读全文

posted @ 2012-03-15 14:00 ayao 阅读(3379) 评论(0) 推荐(0) 编辑

导航