kavinithiy / ie7-js

Automatically exported from code.google.com/p/ie7-js
0 stars 0 forks source link

about iframe tag #271

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The following text is my translation with google.
I found that IE can not use the CSS style under the control of iframe tag 
background color and borders
I use the following script to modify the default properties iframe

if(document.all){
    window.attachEvent("onload", function(){
        var ifs = document.getElementsByTagName("iframe");
        for (var i = 0; i<ifs.length; i++) {
            var iframe = ifs[i];
            var clone = iframe.cloneNode(true);
            clone.setAttribute("frameBorder", 0, 0);
            clone.setAttribute("allowTransparency", true, 0);
            iframe.parentNode.insertBefore(clone, iframe);
            iframe.parentNode.removeChild(iframe);
        }
    });
}

Original issue reported on code.google.com by gucong on 12 Aug 2010 at 2:52