<!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=gb2312" />
<title>全屏</title>
<style type="text/css">
#Dall_screen, #Iall_screen {
position:absolute;
left:0px;
top:0px;
}
#Dall_screen {
z-index:100;
background-color:gray;
filter:alpha(opacity=50);
opacity:0.5;
}
#Iall_screen {
z-index:99;
filter:alpha(opacity=50);
opacity:0.5;
}
</style>
<script type="text/javascript">
var $ = function (id) {
//获取对象
return document.getElementById(id);
};
var all_screen = function () {
var div, iframe;
document.body.innerHTML += '<div id="Dall_screen"> <\/div><iframe id="Iall_screen" frameborder="0"><\/iframe>';
div = $("Dall_screen"), iframe = $("Iall_screen");
iframe.allowTransparency = true;
//$("o").disabled = false;
div.style.height = iframe.style.height = Math.max(document.documentElement.scrollHeight, document.documentElement.clientHeight) + "px";
div.style.width = iframe.style.width = Math.max(document.documentElement.scrollWidth, document.documentElement.clientWidth) + "px";
};
</script>
</head>
<body>
控制这个下拉框的般透明度<select id="o">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select><br>
<input type="button" value="添加" onclick="all_screen()" />
</body>
</html>