获得iframe中的document对象
var iframe= document.getElementById(iframeID);
var doc = iframe.contentDocument;
if (doc == undefined || doc == null)
doc = iframe.contentWindow.document;
//可以通过doc操作iframe中的标签内容了
访问iframe中的JavaScript对象或方法
var obj = iframe.contentWindow;
//obj.对象
//obj.方法
var iframe= document.getElementById(iframeID);
var doc = iframe.contentDocument;
if (doc == undefined || doc == null)
doc = iframe.contentWindow.document;
//可以通过doc操作iframe中的标签内容了
访问iframe中的JavaScript对象或方法
var obj = iframe.contentWindow;
//obj.对象
//obj.方法
230

被折叠的 条评论
为什么被折叠?



