The code is as follows:
Var iframe = document. createelement ("iframe ");
Iframe. id = "frame-" + index;
Iframe. src = url;
Iframe. width = "100% ";
Iframe. marginwidth = "0 ";
Iframe. scrolling = "no ";
Iframe. frameborder = "0 ";
Using "View source code of the selected region" in ie, we found that the created iframe code is <iframe frameborder = 0/>. I searched the relevant information on the internet. It turns out that ie does not recognize lowercase letters, i'm dizzy ....
Use
The code is as follows:
Setattribute ("frameborder", "0", 0 );
// The problem is solved.
The code is as follows:
Var iframe = document. createelement ("iframe ");
Iframe. id = "frame-" + index;
Iframe. src = url;
Iframe. width = "100% ";
Iframe. marginwidth = "0 ";
Iframe. scrolling = "no ";
Iframe. setattribute ("frameborder", "0", 0); // The Last 0 indicates whether the case is different. The problem is solved.