ITeye博客

显示全屏覆盖层

jacklan · 2008-08-01 09:58 · javascript · Markdown

<div id="topDiv" style="filter:alpha(opacity=30);-moz-opacity:0.5; z-index:1000 ;   position: absolute;left:0px ;top:0px; BACKGROUND-COLOR: #A5C8FC ; ">
</div>


  //显示全屏覆盖层
  function showTopDiv()
  {
  		var topDiv =document.getElementById("topDiv") ;
  		topDiv.style.display="" ;
  		var winWidth=document.body.clientWidth ;
  		var winHeight=document.body.clientHeight ;
  		topDiv.style.width=winWidth ;
  		topDiv.style.height=winHeight ;
  		
  }
  //隐藏全屏覆盖层
  function hiddenTopDiv()
  {
  		var topDiv =document.getElementById("topDiv") ;
  		topDiv.style.display="none" ; 
  
  }

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。