asp的div显示/隐藏

来源:百度知道 编辑:UC知道 时间:2024/05/22 19:38:17
请教大侠:1.我隐藏了register后,上面的元素怎么没隐藏呢? 2.点击"注册",为什么register没有显示出来呢,提示网页上有错误
<html>
<head>
<script type="text/javascript">
Function show()
{
document.getElementById("register").style.visibility="visible"

}
</script>
</head>

<body>

<div id="login" style="width:auto;margin-top:10; height:30%;background:#006699;">
<p style="color:yellow"> 请输入用户名和密码<p>
用户名:<input type="text">
<br/>
密  码:<input type="pssword">
<br/>
<input type="button" value="登录" >
<input type="button" value="注册" onclick="show()">

</div>
<div id="register" style="width:auto;margin-top:60;height:80%;background:blue:visibi

大哥- -错误太多了
1.function最好小写
2.input type="pssword"是password
3.background:blue【:】visibility:hidden是分号好不- -
4.margin,top,left之类的属性要带单位,一般是px像素
5.要弄注册登陆要FORM的~不过估计你仅仅是测试html+js排版吧~
6.还有你没有设置在显示注册时隐藏登陆~

……其实这个排版看起来很囧。。。

<html>
<head>
<script type="text/javascript">
function show()
{
document.getElementById("register").style.display="block";
document.getElementById("login").style.display="none";
}
</script>
</head>

<body>

<div id="login" style="width:auto;margin-top:10px;height:30%;background:#006699;display:block;">
<p style="color:yellow">请输入用户名和密码<p>
用户名:<input type="text">
<br/>
密  码:<input type="password">
<br/>
<input