//获取iframe下的document
var doc=document.getElementById('mainFrame').contentDocument || document.frames['mainFrame'].document
$('iframe').contents().find('selector')
//获取iframe下的document
var doc=document.getElementById('mainFrame').contentDocument || document.frames['mainFrame'].document
$('iframe').contents().find('selector')