<iframe src=''>
       <iframe src=''>
                 <iframe src=''> <div></div></iframe> 
        </iframe> 
</iframe>

$($( $(window.frames.document).find('iframe')[0].contentWindow.document).find('iframe').get(0).contentWindow.document).find('div')

第一步:$(window.frames.document)返回一个document,

第二步:find('iframe')>>>>>>$(window.frames.document).find('iframe'),返回的是jQuery对象,需要转换为dom对象,通过get(0),[0].

第三步:获取当前iframe的document对象 》》》$( $(window.frames.document).find('iframe')[0].contentWindow.document).find('iframe').get(0).contentWindow.document

依次循环。。。。。

同时今儿使用find('fieldset.extension')时候,发现find('fieldset--- 空格---.extension')有空格的时候无效

以及$('aa').style.display='none' 报错>>>>>>>>>>应该使用$('aa').css('display','none'),$('aa').hide(); 解释:$("aa")返回的是jQuery的对象,所有需要$('aa')[0].style.display='none'

 

posted on 2016-03-16 14:22  cleverbo  阅读(914)  评论(0编辑  收藏  举报