复制代码 代码如下: 弹出提示 <BR>* { <BR>margin: 0; <BR>padding: 0; <BR>font-size: 12px; <BR>} <BR>html, body { <BR>height: 100%; <BR>width: 100%; <BR>} <BR>#content { <BR>background: #FFFFFF; <BR>padding: 30px; <BR>height: 100%; <BR>} <BR>#content a { <BR>font-size: 30px; <BR>color: #369; <BR>font-weight: 700; <BR>} <BR>#alert { z-index:2; <BR>border: 1px solid #369; <BR>width: 300px; <BR>height: 150px; <BR>background: #e2ecf5; <BR>z-index: 1000; <BR>position: absolute; <BR>display: none; <BR>} <BR>#alert h4 { <BR>height: 20px; <BR>background: #369; <BR>color: #fff; <BR>padding: 5px 0 0 5px; <BR>} <BR>#alert h4 span { <BR>float: left; <BR>} <BR>#alert h4 span#close { <BR>margin-left: 210px; <BR>font-weight: 500; <BR>cursor: pointer; <BR>} <BR>#alert p { <BR>padding: 12px 0 0 30px; <BR>} <BR>#alert p input { <BR>width: 120px; <BR>margin-left: 20px; <BR>} <BR>#alert p input.myinp { <BR>border: 1px solid #ccc; <BR>height: 16px; <BR>} <BR>#alert p input.sub { <BR>width: 60px; <BR>margin-left: 30px; <BR>} <BR>#mask{ position:absolute; top:0; left:0; height:100%; width:100%; background:#000; opacity:0.3; display:none; z-index:1;} <BR> 注册 现在注册关闭 用户名 密 码 <BR>var myAlert = document.getElementById("alert"); <BR>var myMask=document.getElementById('mask'); <BR>var reg = document.getElementById("content").getElementsByTagName("a")[0]; <BR>var mClose = document.getElementById("close"); <BR>reg.onclick = function() <BR>{ <BR>myMask.style.display="block"; <BR>myAlert.style.display = "block"; <BR>myAlert.style.position = "absolute"; <BR>myAlert.style.top = "50%"; <BR>myAlert.style.left = "50%"; <BR>myAlert.style.marginTop = "-75px"; <BR>myAlert.style.marginLeft = "-150px"; <BR>document.body.style.overflow = "hidden"; <BR>} <BR>mClose.onclick = function() <BR>{ <BR>myAlert.style.display = "none"; <BR>myMask.style.display = "none"; <BR>} <BR>