<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>js实现div层跳出并锁屏</title>
<style type="text/css">
<!--
.black_overlay{
display: none;
position: absolute;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background-color: gray;
z-index:1001;
-moz-opacity: 0.8;
opacity:.80;
filter: alpha(opacity=80);
}
.white_content {
display: none;
position: absolute;
top: 25%;
left: 25%;
width: 50%;
height: 50%;
padding: 16px;
border: 16px solid orange;
background-color: white;
z-index:1002;
overflow: auto;
}
.EmailTitle
{
font-size:18px;
color:#84ACD4;
font-weight:bold;
}
-->
</style>
<script type="text/javascript" language="javascript">
function opendiv(lixing){
document.getElementById('light').style.display='block';
if(lixing==0)
document.getElementById('fade').style.display='block';
}
function colsediv(lixing){
document.getElementById('light').style.display='none';
if(lixing==0)
document.getElementById('fade').style.display='none';
}
</script>
</head>
<body>
<p>可以根据自己要求修改css样式<a href = "javascript:void(0)" onclick = "opendiv(0)">点击这里打开窗口(不允许)</a></p>
<p>可以根据自己要求修改css样式<a href = "javascript:void(0)" onclick = "opendiv(1)">点击这里打开窗口(允许)</a></p>
<p>可以根据自己要求修改css样式<a href = "http://www.baidu.com">打开baidu</a></p>
<div id="light" class="white_content">
<div class="EmailTitle">支付帮助</div>
<textarea cols="69" rows="15" name="textarea" id="textarea1" readonly="true">
1.漂亮的弹出div层且锁屏!
2.承接中、小网站的建设,开发语言C#,JAVA!
</textarea>
<div style="margin:0 0 0 250px;"><a href = "javascript:void(0)" onclick = "colsediv(0)">确定</a></div>
</div>
<div id="fade" class="black_overlay"></div>
</body>
</html>
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>js实现div层跳出并锁屏</title>
<style type="text/css">
<!--
.black_overlay{
display: none;
position: absolute;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background-color: gray;
z-index:1001;
-moz-opacity: 0.8;
opacity:.80;
filter: alpha(opacity=80);
}
.white_content {
display: none;
position: absolute;
top: 25%;
left: 25%;
width: 50%;
height: 50%;
padding: 16px;
border: 16px solid orange;
background-color: white;
z-index:1002;
overflow: auto;
}
.EmailTitle
{
font-size:18px;
color:#84ACD4;
font-weight:bold;
}
-->
</style>
<script type="text/javascript" language="javascript">
function opendiv(lixing){
document.getElementById('light').style.display='block';
if(lixing==0)
document.getElementById('fade').style.display='block';
}
function colsediv(lixing){
document.getElementById('light').style.display='none';
if(lixing==0)
document.getElementById('fade').style.display='none';
}
</script>
</head>
<body>
<p>可以根据自己要求修改css样式<a href = "javascript:void(0)" onclick = "opendiv(0)">点击这里打开窗口(不允许)</a></p>
<p>可以根据自己要求修改css样式<a href = "javascript:void(0)" onclick = "opendiv(1)">点击这里打开窗口(允许)</a></p>
<p>可以根据自己要求修改css样式<a href = "http://www.baidu.com">打开baidu</a></p>
<div id="light" class="white_content">
<div class="EmailTitle">支付帮助</div>
<textarea cols="69" rows="15" name="textarea" id="textarea1" readonly="true">
1.漂亮的弹出div层且锁屏!
2.承接中、小网站的建设,开发语言C#,JAVA!
</textarea>
<div style="margin:0 0 0 250px;"><a href = "javascript:void(0)" onclick = "colsediv(0)">确定</a></div>
</div>
<div id="fade" class="black_overlay"></div>
</body>
</html>