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;

你可能感兴趣的:(iframe)