读书人

定位跟js的他处的层

发布时间: 2012-11-01 11:11:31 作者: rapoo

定位,和js的他处的层

<div id="dd" style="background-color:white; border:2px solid #666; width:300px;height:100px;position:absolute;right:600px;top:400px;z-index:101;display:none">
???????<div style="background-image:url(images/transparent.gif);margin-top:40px;margin-left:10px;magin-right:10px;">?????????
?????????<input type="button" value="保 留" onclick="reserve('1');" style="cursor:hand" onmouseover="this.style.color='#FFFFFF'" onmouseout="this.style.color='#000000'" onclick="reserve('0');" style="cursor:hand" onmouseover="this.style.color='#FFFFFF'" onmouseout="this.style.color='#000000'" id="btncancel" value="取 消" style="cursor:hand" onmouseover="this.style.color='#FFFFFF'" onmouseout="this.style.color='#000000'" style="filter:alpha(opacity=50);opacity:0.5;background-color:#000000;display:none">???
<iframe width="100%" height="800" id="frame" style="filter:alpha(opacity=50);opacity:0.5;background-color:#000000" ></iframe>
<div>

?

js--------------
?var bW=document.body.scrollWidth;
?var bH = document.body.scrollTop+document.body.offsetHeight+100;
?$("#ifrdiv").css({width:bW,height:bH,top:"0px",left:"0px",position:"absolute"});
?$("#ifrdiv").css("z-index",100);
?$("#ifrdiv").show();
?$("#frame").css({width:bW,height:bH});?
?$("#dd").show();

----用jquery写的。

读书人网 >JavaScript

热点推荐