IE,FF下取Iframe window对象的方法

 

IE:document.frames("Iframe_ID");

 

FF: document.frames("Iframe_ID") : document.getElementById("ifr_1").contentWindow;

 

IE和FF都兼容的方法:

 

var ifr = document.frames ? document.frames("ifr_1") : document.getElementById("ifr_1").contentWindow;

posted @ 2010-03-25 10:26  db's jim  阅读(243)  评论(0)    收藏  举报