js获取ifram对象

1.获取iframe对象

var doc=document.getElementById('frameId').contentWindow.document;

//var doc=parent.document.getElementById('frameId').contentWindow.document;

2.获取iframe里面dom元素对象

$("#elementId",doc).val();

原文地址:https://www.cnblogs.com/chenweichu/p/5692769.html