为了账号安全,请及时绑定邮箱和手机立即绑定

想做个登录框,为什么不行呀!求解答

<!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>登录框</title>

</head>

<style>

*{margin:0;padding:0}

#div1{position: absolute;

width:100%;

     height:100%;

background:#999;

opactiy:0;

filter:Alpha(opacity=0);

display:none;

z-index:1000;

}

#div3{width:250px;

      height:150px;

 background:#39F;

 position:absolute;

 top:200px;

 left:40%;

 display:none;

 z-index:1001;

      }

</style>

<script>

function(){

         var oDiv1=document.getElementById("div1");

 var oBtt=document.getElementById("button");

 var oDiv3=document.getElementById("div3");

  

 oBtt.onclick=function(){

 

oDiv1.style.display="block";

 oDiv3.style.display="block";}

 

 

 

 

        

}

</script>

<body>

<div id="div1">

</div>

<div id="div2">

     <input id="button" type="button" value="登陆" />

</div>

<div id="div3">

</div>




</body>

</html>


正在回答

1 回答

<!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>登录框</title>

</head>

<style>

*{margin:0;padding:0}

#div1{position: absolute;

width:100%;

     height:100%;

background:#999;

display:none;

z-index:1000;

}

#div3{width:250px;

      height:150px;

 background:#39F;

 position:absolute;

 top:200px;

 left:40%;

 display:none;

 z-index:1001;

      }

</style>

<script>

function(){

         var oDiv1=document.getElementById("div1");

 var oBtt=document.getElementById("button");

 var oDiv3=document.getElementById("div3");

  

 oBtt.onclick=function(){

 

oDiv1.style.display="block";

 oDiv3.style.display="block";}

 

 

 

 

        

}

</script>

<body>

<div id="div1">

</div>

<div id="div2">

     <input id="button" type="button" value="登陆" />

</div>

<div id="div3">

</div>




</body>

</html>


0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

想做个登录框,为什么不行呀!求解答

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信