<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeBehind="Add.aspx.cs" Inherits="Maticsoft.Web.Admin.Add" Title="增加页" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <script src="../../js/Common.js" type="text/javascript"></script>

    <style type="text/css">
        BODY
        {
            margin: 0px;
        }
        </style>

    <script language="javascript" type="text/javascript">
       var checkUserName={
   
     change:function()
    {      
     
       if(document.getElementById("<%=txtName.ClientID %>").value.length==0)
       {
       document.getElementById("pName").innerHTML="用户名不能为空";
        document.getElementById("<%=txtName.ClientID %>").focus();
       }else
       {
        Ajaxs.GET("checkUserName.aspx?userName="+encodeURI(document.getElementById("<%=txtName.ClientID %>").value),checkUserName.show);
        }
    },
    show:function (req)
    { 
        var str=req.responseText;
  
    checkUserName.get(str);
    },
    get:function(str)
    {
    if(str!="")
    {
    document.getElementById("pName").innerHTML=str;
    document.getElementById("<%=txtName.ClientID %>").value="";
    document.getElementById("<%=txtName.ClientID %>").focus();
    }
    else
    {
     document.getElementById("pName").innerHTML="该名称可用";
    }
    }
    }
    </script>

    <table cellspacing="0" cellpadding="0" width="99%" align="center" border="0">
        <tbody>
            <tr>
                <td>
                    <fieldset>
                        <legend class="tt1">添加用户</legend>
                        <table bgcolor="#a4b6d7" width="90%" border="0" align="center" cellpadding="3" cellspacing="1">
                            <tr>
                                <td width="25%" height="25" align="right" bgcolor="#ecf5ff">
                                    登录名：
                                </td>
                                <td width="*" height="25" align="left" bgcolor="#FFFFFF">
                                  <asp:TextBox ID="txtName" runat="server" Width="200px" onblur="checkUserName.change(this);"></asp:TextBox>
                                    <div id="pName"></div>
                              </td>
                          </tr>
                            <tr>
                                <td width="25%" height="25" align="right" bgcolor="#ecf5ff">
                                    密码：
                                </td>
                                <td width="*" height="25" align="left" bgcolor="#FFFFFF">
                                  <asp:TextBox ID="txtPwd" runat="server" Width="200px" TextMode="Password"></asp:TextBox>
                              </td>
                          </tr>
                            <tr>
                                <td width="25%" height="25" align="right" bgcolor="#ecf5ff">
                                    确认密码：
                                </td>
                                <td width="*" height="25" align="left" bgcolor="#FFFFFF">
                                  <asp:TextBox ID="txtPwd1" runat="server" Width="200px" TextMode="Password"></asp:TextBox>
                              </td>
                          </tr>
                            <tr>
                                <td height="35" colspan="2" bgcolor="#FFFFFF" align="center">
<asp:Button ID="Button1" runat="server" Text="提交" OnClick="btnAdd_Click" class="button2">
                                  </asp:Button>
                                  <input id="Reset2" type="reset" value="重填" runat="server" class="button2" />
                                    </td>
                            </tr>
                        </table>
                    </fieldset>
                </td>
            </tr>
        </tbody>
    </table>
</asp:Content>
