ITeye博客

dwr ...设置透明div

xxtianxiaxing · 2009-03-03 13:44 · web · Markdown


<%@ page language="java" contentType="text/html; charset=utf-8"%>
<!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>
<script type="text/javascript"  src="/HereB2B/dwr/engine.js"></script>
<script type="text/javascript" src="/HereB2B/dwr/util.js"></script>
<script>
function init() {
  useLoadingImage11("../../images/ad_5.jpg");
}

function useLoadingImage11(imageSrc) { 
  var loadingImage; 
  if (imageSrc) loadingImage = imageSrc; 
  else loadingImage = "../../images/ad_5.jpg"; 
    var disabledImageZone = $('header'); 
    if (!disabledImageZone) { 
      disabledImageZone = document.createElement('div'); 
      disabledImageZone.setAttribute('id', 'disabledImageZone'); 
      disabledImageZone.style.position = "absolute"; 
      disabledImageZone.style.zIndex = "1000"; 
      disabledImageZone.style.left = "0px"; 
      disabledImageZone.style.top = "0px"; 
      disabledImageZone.style.width = "100%"; 
      disabledImageZone.style.height = "100%"; 
      var imageZone = document.createElement('img'); 
      imageZone.setAttribute('id','imageZone'); 
      imageZone.setAttribute('src',imageSrc); 
      imageZone.style.position = "absolute"; 
      imageZone.style.top = "0px"; 
      imageZone.style.right = "0px"; 
      disabledImageZone.appendChild(imageZone); 
      document.body.appendChild(disabledImageZone); 
    } 
    else { 
      $('imageZone').src = imageSrc; 
      disabledImageZone.style.visibility = 'visible'; 
    } 
} 
</script>
</head>
<body onload="init();">
<div></div>
</html>




bg{width:900px;height:900px;backgroundCCC url(place.gif) repeat;
position:absolute;filter:alpha(opacity=50);}




评论(0)

暂无评论。

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