张晓华的博客

        2005年,最后一场雪,还是下了,虽然凄凉了一些!
posts - 171, comments - 87, trackbacks - 5, articles - 1

DIV 背景半透明

Posted on Wednesday, May 09, 2007 10:42 AM

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<body>
                      <form id="form1" name="form1" method="post" action="">
                                      <label>TEST
 <input name="button"  onclick="ff()" type="button"  value="测试" /> 
                        </label>
</form>
           <script>
           i=5;
           //setTimeout('ff('+i+')',3000);
           function ff(){
           if(i!=0){
          document.getElementById('Temp').style.display='block';
          setTimeout('ff('+i+')',300);
          i--;
          document.getElementById('Temp1').innerHTML=i;
          }else{
          i=5;
          document.getElementById('Temp').style.display='none';
          
          }
           }
          
          
           </script>
     
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <div style="height:100%;width:100%; display:none;cursor:wait;filter:alpha(opacity=50); background-color:#00CC00; position:absolute;left:0px;top:0px;right:0px;bottom: 0px;" id="Temp">
 
  
  <div style="position:absolute;left:80px;top:160px;right:0px;bottom: 0px;">提示信息: <div id="Temp1" > </div>  </div>
  <br />  id "Temp" 的内容</div>
 

</body>
</html>

Post Comment

Title  
Name  
Url
Comment   
Protected by Clearscreen.SharpHIPEnter the code you see: