iframe取值

1 var doc = document.all ? document.frames[0].document : document.getElementById("iframe").contentDocument;
2 console.log(doc.body.innerHTML);
3 console.log(doc.getElementById("box").innerHTML);
1 var iframe = document.getElementById("xx");
2 var doc = document.all ? iframe.document : iframe.contentDocument

 

 

 

posted @ 2012-10-16 08:23  小猩猩君  阅读(713)  评论(0编辑  收藏  举报