Develop/자바스크립트
DIV 전체화면 화면 잠금 - 크로싱,스크롤에도 문제 없음
다니엘SEO
2010. 1. 5. 12:48
<html>
<head>
<script type="text/javascript">
function hid(){
var obj = document.getElementById("bak");
obj.style.width = document.body.scrollWidth + 'px';
obj.style.height = document.body.scrollHeight + 'px';
obj.style.filter = "alpha(opacity=80)";
obj.style.opacity = "0.8";
obj.style.visibility = "visible";
}
</script>
</head>
<body style="margin:0px;">
<div id="bak" style="width:100%;height:100%;top:0px;position:absolute; z-index:1;background:#1B1B1B;visibility:hidden;">
</div>
<div>11111</div>
<input type="button" value="화면가리기" onclick="hid()">
</body>
</html>