zoukankan      html  css  js  c++  java
  • jQuery实现的可隐藏,显示的登陆框

    http://www.corange.cn//uploadfiles/20100424-2_20914.jpg

    点击login显示登录的输入框,可以点击关闭按钮关闭
    <!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" />
    <link rel="stylesheet" href="style.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="fx.slide.css" type="text/css" media="screen" />
    <script src="jquery-1.3.1.min.js" type="text/javascript"></script>
    <script language="javascript" >
    $(function(){
    $("#toggleLogin").toggle(function(){
    $("#login").parent("div").animate({ height : 105 } , 520 );
    $("#login").animate({marginTop : 0 } , 500 );
    $(this).blur();
    },function(){
    $("#login").parent("div").animate({ height : 0 } , 500 );
    $("#login").animate({marginTop : -105 } , 520 );
    $(this).blur();
    });
    $("#closeLogin").click(function(){
    $("#login").parent("div").animate({ height : 0 } , 500 );
    $("#login").animate({marginTop : -105 } , 520 );
    });
    })
    </script>

    </head>

    <body>
    <!-- Login -->
    <div style="margin: 0px; overflow: hidden; position: relative; height: 0px;">
    <div id="login" style="margin: -105px 0px 0px; height: auto;">
    <div class="loginContent">
    <form action="#" method="post">
    <label for="log"><b>Username: </b></label>
    <input class="field" type="text" name="log" id="log" value="" size="23" />
    <label for="pwd"><b>Password:</b></label>
    <input class="field" type="password" name="pwd" id="pwd" size="23" />
    <input type="submit" name="submit" value="" class="button_login" />
    <input type="hidden" name="redirect_to" value=""/>
    </form>
    <div class="left">
    <label for="rememberme"><input name="rememberme" id="rememberme" class="rememberme" type="checkbox" checked="checked" value="forever" /> Remember me</label></div>
    <div class="right">Not a member? <a href="#">Register</a> | <a href="#">Lost your password?</a></div>
    </div>
    <div class="loginClose"><a href="#" id="closeLogin">Close Panel</a></div>
    </div>
    </div>
    <!-- /login -->

    <div id="container">
    <div id="top">
    <!-- login -->
    <ul class="login">
    <li class="left">&nbsp;</li>
    <li>Hello Guest!</li>
    <li>|</li>
    <li><a id="toggleLogin" href="#">Log In</a></li>
    </ul> <!-- / login -->
    </div> <!-- / top -->

    <div class="clearfix"></div>

    <br><br>
    </body>
    </html>

    完整代码
    http://www.corange.cn//uploadfiles/example11_11529.rar

    原文地址:http://www.corange.cn/archives/2010/04/3615.html
  • 相关阅读:
    Part0:安装Django
    计算机技术与科学系列笔记
    svg基础知识体系建立
    js如何判断字符串里面是否含有某个字符串
    js字符串如何倒序
    js判断值是否是数字
    HTML DOM 知识点整理(一)—— Document对象
    Git hub pull时候的错误 : The current branch is not configured for pull No value for key branch.master.merge found in configuration
    Map的3种遍历[轉]
    如何刪除GitHub中的repository
  • 原文地址:https://www.cnblogs.com/zerogo/p/1746201.html
Copyright © 2011-2022 走看看