//获取iframe下的document
var doc=document.getElementById(‘mainFrame‘).contentDocument || document.frames[‘mainFrame‘].document
$(‘iframe‘).contents().find(‘selector‘)
iframe小方法
原文:http://www.cnblogs.com/xshaohua-com/p/6650613.html