首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

定位,跟js的他处的层

2012-11-01 
定位,和js的他处的层div iddd stylebackground-color:white border:2px solid #666 width:300pxh

定位,和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写的。

热点排行