您的位置:首页 > 其它

div浮动层

2016-05-31 17:20 393 查看
<!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=utf-8" />
<title>div浮动层</title>
</head>
<body>
<div style="padding-top: 20px;">
<input type="submit" name="" value="浮动层"onclick="javascript:showDiv()" />
</div>
</body>
<div id=win style="display:none; POSITION:absolute; left:50%; top:50%; width:400px; height:180px; margin-left:-230px; margin-top:-50px; border:1px solid #888; background-color:#FF0000; text-align:center">
<div style="clear: both;"></div><!--撑开位置折行-->
<li class="form-item action-verifycode" ><label style="width: 200px; height:30px;">让我们确定您不是机器人</label></li>
<a style="margin:25px 0px 25px 3px;" href="#" onclick="closeLogin()" class="btn" ><span><span>取消</span></span></a>
</div>

</body>
</html>
<script>
function showDiv(){
document.getElementById('win').style.display='block';
}
function closeLogin(){
document.getElementById("win").style.display="none";
var h = document.getElementById("id_verifycode");
h.removeClass('disabled');
var a=document.getElementById ("span");
a.innerHTML = "重发验证码";
}
</script>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  浮动层