62,269
社区成员
发帖
与我相关
我的任务
分享
<!-- saved from url=file://C:/Documents and Settings/yfq/桌面/弹出层窗口2.html -->
<script>
window.onerror = new Function("return(false);")
</script><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>Demo</TITLE>
<STYLE type=text/css>
<!--
*{
margin:0;
padding:0;
}
html,body{
height:100%;
}
#shadow{
position:absolute;
left:0;
top:0;
width:100%;
height:100%;
background-color:#0060C0;
filter:alpha(opacity=20);
}
#box{
position:absolute;
left:50%;
top:50%;
width:400px;
height:180px;
margin:-90px 0 0 -200px;
border:1px solid #84A0C4;
background-color:#DFE8F6;
text-align:center;
}
-->
</STYLE>
<SCRIPT language=javascript type=text/javascript>
<!--
function createDiv()
{
var btnShow = document.getElementById("btnshow");
btnShow.disabled=true;
var shadow = document.createElement("div");
shadow.setAttribute("id","shadow");
shadow.style.zIndex="10";
var box=document.createElement("div");
box.setAttribute("id","box");
box.style.zIndex="999";
var spanUser=document.createElement("span");
spanUser.innerHTML="User:";
var textUser=document.createElement("input");
textUser.setAttribute("type","text");
textUser.setAttribute("id","textUser");
var button=document.createElement("input");
button.setAttribute("type","button");
button.setAttribute("id","button1");
button.setAttribute("value","Confirm");
button.onclick=hideDiv;
box.appendChild(spanUser);
box.appendChild(textUser);
box.appendChild(button);
document.body.appendChild(shadow);
document.body.appendChild(box);
}
function hideDiv()
{
var textUser=document.getElementById("textUser");
var user=document.getElementById("user");
user.value=textUser.value;
var box=document.getElementById("box");
var shadow=document.getElementById("shadow");
var btnShow=document.getElementById("btnShow");
document.body.removeChild(box);
document.body.removeChild(shadow);
btnShow.disabled=false;
}
-->
</SCRIPT>
</HEAD>
<BODY><!--StartFragment--><DIV style="TEXT-ALIGN: center"><INPUT id=user> <INPUT id=btnshow onclick=createDiv() type=button value=Display> </DIV><!--EndFragment--></BODY>
</HTML>
<!-- saved from url=file://C:/Documents and Settings/yfq/桌面/弹出层窗口.html -->
<script>
window.onerror = new Function("return(false);")
</script><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD id=Head1><TITLE></TITLE>
<STYLE> .black_overlay { DISPLAY: none; Z-INDEX: 1001; FILTER: alpha(opacity=80); LEFT: 0%; WIDTH: 100%; POSITION: absolute; TOP: 0%; HEIGHT: 100%; BACKGROUND-COLOR: black; moz-opacity: 0.8; opacity: .80 }
.white_content {FONT-SIZE:10PT; BORDER-RIGHT: orange 1px solid; PADDING-RIGHT: 16px; BORDER-TOP: orange 1px solid; DISPLAY: none; PADDING-LEFT: 16px; Z-INDEX: 1002; LEFT: 25%; PADDING-BOTTOM: 16px; OVERFLOW: auto; BORDER-LEFT: orange 1px solid; WIDTH: 50%; PADDING-TOP: 16px; BORDER-BOTTOM: orange 1px solid; POSITION: absolute; TOP: 25%; HEIGHT: 50%; BACKGROUND-COLOR: white }
</STYLE>
</HEAD>
<BODY><!--StartFragment--><FORM id=form1>
<DIV></DIV><INPUT id=Button3 onclick="document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'" type=button value=添加>
<DIV class=white_content id=light style="DISPLAY: none">添加记录 <INPUT> <INPUT type=button value=保存></INPUT> <BR><A
onclick="document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'"
href="javascript:void(0)">关闭</A></DIV>
<DIV class=black_overlay id=fade style="DISPLAY: none"></DIV></FORM><!--EndFragment--></BODY>
</HTML>