日期:2014-05-16 浏览次数:20408 次
<script type = "text/javascript">
var loginStatus = 0;
var registerStatus = 0;
$(document).ready(function(){
alert("sadf");
$(".Panel").hide();
$("#loginPanel").hide();
$("#registerPanel").hide();
});
function loginClick(){
if(loginStatus == 0 || registerStatus == 0){
$(".Panel").slideDown(200);
$("#loginPanel").slideDown(200);
loginStatus = 1;
return;
}
if(loginStatus == 0 || registerStatus == 1){
$("#registerPanel").hide();
$("#loginPanel").slideDown(200);
loginStauts = 1;
registerStatus = 0;
return;
}
if(loginStatus == 1 || registerStatus == 0){
$("#loginPanel").slideUp(200);
$(".Panel").slideUp(200);
return;
}
}
<div id="chooseMethod">
<button id="overviewBTN">浏览</button>
<button id="loginBTN" onclick = "loginClick()">登陆</button>
<button id="registerBTN" onclick = "registerClick()">注册</button>
</div>
<div class="Panel">
<div class = "controls-Panel" id="loginPanel">
<input type="text" class="loginPanel-controls" id="Username">
<input type="text" class="loginPanel-controls" id="Passwd">
<button class="PanelBTN" id="loginPanelBTN">登陆</button>
<div id = "remember">
<input type="checkbox" class="loginPanelCheck" id="loginPanelRem" name = "loginPanelRem">
<label for = "loginPanelRem">记住密码</label>
</div>
<a href="" font-color = "#000">忘记密码?</a>
</div>
<div id = "registerPanel">
<input type="text" class="registerPanel-controls" id="rUsername" placeholder = "用户名">
<input type="text" class="registerPanel-controls" id="rEmail" placeholder = "常用邮箱">
<input type="text" class="registerPanel-controls" id="rPasswd" placeholder = "设置密码">
<button class="PanelBTN" id="registerPanelBTN">注册</button>
</div>
</div>
<div class="button-group" data-login-state="0" data-register-state="0">
<button&nbs