<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="Web.share.wechat.wechatbind._default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
 <title></title>
<meta name="format-detection" content="telephone=no" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link type="text/css" rel="stylesheet" href="/css/reset.css" />
<link type="text/css" rel="stylesheet" href="/css/base.css" />
<script type="text/javascript" src="/js/touch.js"></script>

  <!-- Including Modernizr to test for touch support. -->
  <script src="../../../m/js/modernizr.custom.js"></script>

             <style type="text/css">
        .default {display: inline-block;width: 70px;height: 30px;line-height: 30px;background: #ddd;text-align: center;margin: 4px 2px;background: #eeeeee;}
        .weak {display: inline-block;width: 70px;height: 30px;line-height: 30px;background: #ddd;text-align: center;margin: 4px 2px;background: #FF0000;}
        .medium {display: inline-block;width: 70px;height: 30px;line-height: 30px;background: #ddd;text-align: center;margin: 4px 2px;background: #FF9900;}
        .strong {display: inline-block;width: 70px;height: 30px;line-height: 30px;background: #ddd;text-align: center;margin: 4px 2px;background: #33CC00;}
        .spana {display: inline-block;width: 70px;height: 30px;line-height: 30px;background: #ddd;text-align: center;margin: 4px 2px;}
        .style1{color: #FF0000; }
        </style>
    <script type="text/javascript">
        window.onload = function () {

            var oInput = document.getElementById('tbResetpass1');
            oInput.value = '';
            oInput.onkeyup = function () {
                //强度状态设为默认
                span0.className = span1.className = span2.className = "default";
                var pwd = this.value;
                var result = 0;
                for (var i = 0, len = pwd.length; i < len; ++i) {
                    result |= charType(pwd.charCodeAt(i));
                }

                var level = 0;
                //对result进行四次循环，计算其level
                for (var i = 0; i <= 4; i++) {
                    if (result & 1) {
                        level++;
                    }
                    //右移一位
                    result = result >>> 1;
                }

                if (pwd.length >= 6) {
                    switch (level) {
                        case 1:

                            span0.className = "weak";
                            break;
                        case 2:

                            span0.className = "medium";
                            span1.className = "medium";
                            break;
                        case 3:
                        case 4:


                            span0.className = "strong";
                            span1.className = "strong";
                            span2.className = "strong";
                            break;
                    }
                }
            }
        }
        /*
            定义一个函数，对给定的数分为四类(判断密码类型)，返回十进制1，2，4，8
            数字 0001 -->1  48~57
            小写字母 0010 -->2  97~122
            大写字母 0100 -->4  65~90
            特殊 1000 --> 8 其它
        */
        function charType(num) {
            if (num >= 48 && num <= 57) {
                return 1;
            }
            if (num >= 97 && num <= 122) {
                return 2;
            }
            if (num >= 65 && num <= 90) {
                return 4;
            }
            return 8;
        }
    </script>  

    <style type="text/css">
        .style1
        {
            color: #FF0000;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div class ="login ">

            <asp:Label ID="Label1" runat="server" Text="绑定账写"></asp:Label>
        </div>
        <div class ="login ">
        
                      <asp:TextBox ID="tbUserName_lan" runat="server" MaxLength="25" placeholder="人员编号/登录名/邮箱/电话" 
                CssClass="login-field login-field-password"></asp:TextBox>

      </div>
        <div class ="login ">
      <asp:TextBox ID="tbPassword_lan" runat="server" placeholder="请输入密码" 
                    TextMode="Password" MaxLength="20" CssClass="login-field login-field-password"></asp:TextBox>  
      </div>
        <div class="tab-iteam" >
    <div class="tab-iteam-con">
    	<div class="con" style="margin-top:30px">
                    <asp:LinkButton ID="btForget" runat="server" onclick="btForget_Click" Text="绑定" 
                           CssClass="more" ValidationGroup="lan" />

		</div>
    </div>
</div>
        <div style =" text-align :center; font-size :12px;   margin-bottom :30px; margin-top :10px; ">
            <asp:Label ID="lbOpenid" runat="server" Visible ="false" ></asp:Label>
   <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                    ControlToValidate="tbUserName_lan" Display="Dynamic" ErrorMessage="请输入登录名。" 
                                    ValidationGroup="lan" ForeColor="Red"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                                    ControlToValidate="tbUserName_lan" Display="Dynamic" ErrorMessage="登录名不合规范。" 
                                    ValidationExpression="^[^%&gt;&lt;'&amp;*=!&quot;?]{2,25}$" 
                                    ValidationGroup="lan" ForeColor="Red"></asp:RegularExpressionValidator>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                    ControlToValidate="tbPassword_lan" Display="Dynamic" ErrorMessage="请输入密码。" 
                                    ValidationGroup="lan" ForeColor="Red"></asp:RequiredFieldValidator>
        </div>
    </form>
</body>
</html>
