一、在iframe子页面获取父页面元素代码如下:$('#objld', parent.document); 二、在父页面获取iframe子页面的元素代码如下:$("#objid", document.iframes('iframe').document) 或代码如下:var doc = $(document.getElementById('iframeId').contentWindow.document);var ele = $("#objId",doc);