1. Keep the layer at the beginning without being overwritten by IFRAME and object.
Insert the IFRAME or object in the layer to set the Z-index value.
<Div Z-index: 2> <object XXX> </Object> # front
<Div Z-index: 1> <object XXX> </Object> #
<Div id = "Layer2" style = "position: absolute; top: 40; width: 400px;
Height: 95px; Z-index: 2 "> Height = 100% width = 100%>
<IFRAME width = 0 Height = 0> </iframe>
</Div>
<Div id = "layer1" style = "position: absolute; top: 50; width: 200px;
Height: 115px; Z-index: 1 ">
<IFRAME Height = 100% width = 100%> </iframe> string 6
</Div>
2. Obtain the absolute position of the control
// Javascript
<Script language = "JavaScript">
Function getie (e ){
VaR T = E. offsettop;
VaR L = E. offsetleft;
While (E = E. offsetparent ){
T + = E. offsettop;
L + = E. offsetleft;
}
Alert ("Top =" + T + "/nleft =" + l );
}
</SCRIPT>
Getnowobjectposition: function (){
This. OBJ =;
VaR B = A. offsetleft;
VaR c = A. offsettop;
VaR d = A. offsetparent;
While (D! = NULL ){
If (D. tagname! = "Body "){
B + = D. offsetleft;
C + = D. offsettop;
D = D. offsetparent
}
Else {
B + = Document. Body. offsetleft | 0;
C + = Document. Body. offsettop | 0;
Break
}
}
Return {
X: B,
Y: c
}
},
VaR c = myutility. getnowobjectposition (objplaceid );
Newmask. style. Top = C. Y + "PX ";
Newmask. style. Left = C. x + "PX ";
3. The script will never go wrong
<Script language = "JavaScript">
<! -- Hide
Function killerrors (){
Return true;
}
Window. onerror = killerrors;
// -->
</SCRIPT>