从iframe中获取元素你怎么得到<div>从一个<iframe>?
3 回答

慕田峪4524236
TA贡献1875条经验 获得超5个赞
var iframe = document.getElementById('iframeId');var innerDoc = (iframe.contentDocument) ? iframe.contentDocument : iframe.contentWindow.document;
var iframe = document.getElementById('iframeId');var innerDoc = iframe.contentDocument || iframe.contentWindow.document;
innerDoc.getElementById
重要:

慕丝7291255
TA贡献1859条经验 获得超6个赞
window.parent.document.getElementById("framekit").contentWindow.CallYourFunction('pass your value')
CallYourFunction()
添加回答
举报
0/150
提交
取消