In ie, the layer div is overwritten by the Select in the drop-down box. This is one of the bugs in IE, because the select priority level is higher than that in Div. Therefore, no matter how you use the CSS attribute Z-index settings, it is useless.
Therefore, there are two solutions:
- Hide all select
- Make the content in the DIV higher than the select priority
The first method is obviously troublesome, especially when the SELECT statement is too many and its position is not fixed, it is easy to hide what should not be hidden.
The second time is better. The commonly used HTML controls with a higher priority than select have object and IFRAME, which is better for me to use IFRAME.
The principle is to add an IFRAME to the DIV type and write the content to be displayed to the body of the IFRAME.
ReferenceCodeAs follows:
VaR oiframe = Document. createelement ("<IFRAME name =/" oiframefilter/"frameborder =/" 0/"> </iframe> ")
If (odivfilter. Children. length! = 0) odivfilter. removechild (odivfilter. Children (0 ));
Odivfilter. appendchild (oiframe );
Registry.frames=oiframe.name=.doc ument. Write ("<LINK rel =/" stylesheet/"href =/"/style/css.css/"type =/" text/CSS/"> ");
Sbody = "<Table> <tr> <TD> hahaha </TD> </tr> </table> ";
Registry.frames=oiframe.name=.doc ument. Write (sbody );
In addition, note that the attribute allowtransparency of IFRAME cannot be reused, because transparency invalidates the higher priority of IFRAME.