document.getElementsByTagName('iframe')[0].contentWindow 获取到的就是iframe中的window对象. 转载于:https://www.cnblogs.com/ylht/p/10249676.html