zoukankan      html  css  js  c++  java
  • 可选择Email和用户名登录的代码

    1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    2. <html xmlns="http://www.w3.org/1999/xhtml"> 
    3. <head> 
    4.     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> 
    5.     <title>登陆界面</title> 
    6.         <style type="text/css"> 
    7. * { 
    8.         margin:0; 
    9.         padding:0; 
    10.         font-size:12px; 
    11.         font-weight:normal; 
    12.         font-family:verdana, tahoma, helvetica, arial, sans-serif, "宋体"; 
    13.         font-style:normal; 
    14.         list-style-type:none; 
    15.         text-decoration:none; 
    16. div#body input#fnbtn { 
    17.         78px; 
    18.         height:39px; 
    19.         border:none; 
    20.         cursor:pointer; 
    21.         position:absolute; 
    22.         top:40px; 
    23.         left:100px; 
    24.         background:transparent url('http://www.lanrentuku.com/down/js/images/12447121190.png') 0 -70px no-repeat; 
    25. div#mask { 
    26.         position:absolute; 
    27.         top:0; 
    28.         left:0; 
    29.         background:#fff; 
    30.         filter:alpha(opacity=60); 
    31.         -moz-opacity:0.2; 
    32.         z-index:100; 
    33. div#login { 
    34.         position:absolute; 
    35.         top:75px; 
    36.         left:100px; 
    37.         293px; 
    38.         z-index:200; 
    39. div#login h2 { 
    40.         height:26px; 
    41.         padding-top:3px; 
    42.         padding-left:25px; 
    43.         background:transparent url('http://www.lanrentuku.com/down/js/images/12447121190.png') -84px -70px no-repeat; 
    44. div#login h2 input { 
    45.         height:18px; 
    46.         18px; 
    47.         float:right; 
    48.         border:none; 
    49.         cursor:pointer; 
    50.         margin:2px 6px 0 0; 
    51.         background:transparent url('http://www.lanrentuku.com/down/js/images/12447121190.png') 0 -169px no-repeat; 
    52. div#login h2 a { 
    53.         display:block; 
    54.         float:left; 
    55.         83px; 
    56.         height:26px; 
    57.         line-height:26px; 
    58.         text-align:center; 
    59.         text-decoration:none; 
    60.         color:#666; 
    61. div#login h2 a.cur { 
    62.         color:#f00; 
    63.         background:transparent url('http://www.lanrentuku.com/down/js/images/12447121190.png') 0 -187px no-repeat; 
    64. div#login ul { 
    65.         padding:14px 0 18px 12px; 
    66.         background:transparent url('http://www.lanrentuku.com/down/js/images/12447121190.png') -84px bottom no-repeat; 
    67. div#login ul li { 
    68.         padding-left:60px; 
    69.         margin-top:10px; 
    70.         display:inline-block; 
    71. div#login ul li { 
    72.         display:block; 
    73. div#login ul li:after { 
    74.         content:"youdian"; 
    75.         clear:both; 
    76.         display:block; 
    77.         height:0; 
    78.         visibility:hidden; 
    79. div#login ul li tt { 
    80.         float:left; 
    81.         60px; 
    82.         margin-left:-70px; 
    83.         text-align:right; 
    84.         line-height:22px; 
    85.         color:#444; 
    86. div#login ul li div input.cell, div#login ul li div input.cell2 { 
    87.         height:16px; 
    88.         padding:2px; 
    89.         line-height:16px; 
    90.         179px; 
    91.         border:1px #dcdcdc solid; 
    92.         color:#666; 
    93. div#login ul li div input.cell2 { 
    94.         50px; 
    95. }  
    96. div#login ul li div label { 
    97.         color:#666; 
    98.         cursor:pointer; 
    99. div#login ul li div img { 
    100.         margin-bottom:-7px; 
    101.         margin-left:8px; 
    102. * html div#login ul li div img { 
    103.         margin-bottom:-4px; 
    104. *+html div#login ul li div img { 
    105.         margin-bottom:-4px; 
    106. div#login ul li div input#fnlogin { 
    107.         59px; 
    108.         height:21px; 
    109.         cursor:pointer; 
    110.         border:none; 
    111.         margin-right:15px; 
    112.         background:transparent url('http://www.lanrentuku.com/down/js/images/12447121190.png') 0 -148px no-repeat; 
    113. div#login ul li p { 
    114.         padding-top:4px; 
    115.         color:#f00; 
    116. </style> 
    117. </head> 
    118. <body> 
    119. <div id="body"> 
    120. <input id="fnbtn" type="button" title="" /> 
    121. </div><div id="mask" style="display:none;"></div> 
    122. <div id="login" style="display:none;"> 
    123. <h2><input id="fnquit" type="button" title="退出登录" /><a href="#" class="cur" name="Email">Email登录</a><a href="#" name="用户名">用户名登录</a></h2> 
    124. <ul><form id="LoginForm" name="LoginForm" action="http://www.lanrentuku.com/"  method="post" enctype="multipart/form-data" ><li><input id="loginType" name="loginType" type="hidden"/><tt><label id="logtype" for="email">Email:</label></tt><div><input id="username" name="username" type="text" class="cell" onKeyPress="return checkSubmit(event)"/></div></li> 
    125. <li><tt><label for="password">密 码:</label></tt><div><input id="password" name="password" type="password" class="cell" onKeyPress="return checkSubmit(event)" /></div></li><li><tt></tt> 
    126. <div><input id="reme" name="rememberme" type="checkbox" /> <label for="reme">下次自动登录</label></div></li> 
    127. <li><tt></tt> <div><input id="fnlogin" type="button"/><a href="http://www.lanrentuku.com/" target="_blank" onclick="return checkForgetPassword()">忘记密码?</a></div></li> 
    128. </form></ul> 
    129. </div> 
    130. <script type="text/javascript"> 
    131. function g(obj) { 
    132.         return document.getElementById(obj); 
    133. var login = { 
    134.         title:null, 
    135.         show:function(){ 
    136.                 var sWidth,sHeight; 
    137.                 sWidth = screen.width; 
    138.                 sWidth = document.body.offsetWidth; 
    139.                 sHeight=document.body.offsetHeight; 
    140.                 if (sHeight<screen.height){sHeight=screen.height;} 
    141.                 g("mask").style.width = sWidth + "px"; 
    142.                 g("mask").style.height = sHeight + "px"; 
    143.                 g("mask").style.display = "block"
    144.                 g("login").style.display = "block"
    145.                 g("login").style.right = g("body").offsetLeft + "px"; 
    146.                  
    147. //                window.status = g("body").offsetLeft; 
    148.         }, 
    149.         hide:function(){ 
    150.                 g("mask").style.display = "none"
    151.                 g("login").style.display = "none"
    152.         } 
    153. g("fnbtn").onclick = function(){ 
    154.         login.show(); 
    155.         this.blur(); 
    156.         this.style.backgroundPosition = "0 -109px"
    157. }; 
    158. g("fnlogin").onclick = function() { 
    159.     // The following 5 lines of code is used to get the login type & pass to the form 
    160.     // One More line of code is insert to root_index.jsp to capture the hidden value 
    161.     if (document.getElementById("logtype").innerHTML == "Email:") { 
    162.         document.getElementById('loginType').value = 'email'
    163.     } else { 
    164.         document.getElementById('loginType').value = 'mobile';    
    165.     } 
    166.     document.LoginForm.submit(); 
    167. }; 
    168. g("fnquit").onclick = function(){login.hide();g("fnbtn").style.backgroundPosition = "0 -70px";}; 
    169. var aa = g("login").getElementsByTagName("a"); 
    170. var aTab = new Array(); 
    171. for(var i=0; i<aa.length; i++){ 
    172.         if(aa[i].parentNode.nodeName == "H2"){ 
    173.                 aTab.push(aa[i]); 
    174.         } 
    175. for(var j=0; j<aTab.length; j++){ 
    176.         aTab[j].onclick = function(){ 
    177.                 this.blur(); 
    178.                 if (this.className != "cur"){ 
    179.                         for(var k=0; k<aTab.length; k++){aTab[k].className = ""}; 
    180.                         this.className = "cur" 
    181.                         g("logtype").innerHTML = this.name + ":"; 
    182.         } 
    183.         } 
    184. </script> 
    185. <script language="javascript"> 
    186. login.hide(); 
    187. </script> 
    188.  
    189. </body> 
    190. </html> 

  • 相关阅读:
    洛谷P2522 [HAOI2011]Problem b(莫比乌斯反演)
    洛谷P3327 [SDOI2015]约数个数和(莫比乌斯反演)
    Informatica PowerCenter 常用转换组件一览表
    Informatica_(3)组件
    Informatica_(2)第一个例子
    Informatica_(1)安装
    InformaticaPowerCenter调用存储过程
    Informatica 9.5.1 安装配置
    Linux字符集的查看及修改
    Redis-3.2.9集群配置(redis cluster)
  • 原文地址:https://www.cnblogs.com/umgsai/p/3908170.html
Copyright © 2011-2022 走看看