As we all know, as long as you set the IFRAME attribute: frameborder = "0", IFRAME does not display the border, but when you use the following method, it seems that this attribute does not work: JS Code
- This. Frame = Document. createelement ("Iframe");
- ...
- This. Frame. setattribute ("Frameborder","0");
- ...
Ifram still shows the border. Why? If you check Dom inspector, you will find that all attributes in Dom are in uppercase under IE, that is, the above Code, in IE, it will eventually become: JS Code
- <IFRAME frameborder = 0...
Because IE is capitalized, it does not recognize "frameborder. Now that you know why, you can solve the problem and change the code: JS Code
- This. Frame = Document. createelement ("Iframe");
- ...
- This. Frame. setattribute ("Frameborder","0",0);
- ...
This. Frame. setattribute ("Frameborder","0",0); The '0' next to it indicates whether it is case sensitive. |