<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    var state = false;
      $(document).ready(function(){
      
         $("#txt2UserName").focus();
         $("#txt2UserName").keyup(function(){
         $.ajax({
                //提交數(shù)據(jù)的類型 POST GET
                type:"GET",
                //提交的網(wǎng)址
               url: "reg.aspx",
                //提交的數(shù)據(jù)
                data:{isAjax:"true",Name:$("#txt2UserName").val()},//$("#txt2UserName").val()
                //返回數(shù)據(jù)的格式
                datatype: "text",//"xml", "html", "script", "json", "jsonp", "text".
                //在請求之前調(diào)用的函數(shù)
                //beforeSend:function(){$("#idMessage").html("logining");},
                //成功返回之后調(diào)用的函數(shù)            
              //  success:function(data){
             //  $("#idMessage").html(decodeURI(data));           
                //}   ,
                //調(diào)用執(zhí)行后調(diào)用的函數(shù)
                complete: function(XMLHttpRequest, textStatus){
                   //alert(XMLHttpRequest.responseText);
                   var mes = XMLHttpRequest.responseText;
                   state =mes=="0";
                   mes = mes=="0"?("用戶名可以注冊!"):("用戶名已存在不能注冊!");
                   $("#idMessage").html(mes);
                    //HideLoading();
                },
                //調(diào)用出錯執(zhí)行的函數(shù)
               error: function(){
                    //請求出錯處理
                }        
             });
         
         // $("#idMessage").html($(this).val());
         })
      
       $("#BtReg").bind("click",
        function()
        {
        var txt2UserName = $("#txt2UserName").val();
        var txt2Pwd = $("#txt2Pwd").val();
        var txt2APwd = $("#txt2APwd").val();
        var txt2Mail = $("#txt2Mail").val();
        if(txt2UserName.length<1)
        {
        $.messager.alert('信息','用戶名不能為空!');
        $("#txt2UserName").focus();
        return false;
        }
        else if(txt2Pwd.length<1)
        {
        $.messager.alert('信息','密碼不能為空!');
        $("#txt2Pwd").focus();
        return false;
        }
        else if(txt2APwd.length<1)
        {
        $.messager.alert('信息','密碼不能為空!');
        $("#txt2APwd").focus();
        return false;
        }
        else if(txt2APwd!=txt2Pwd)
        {
        $.messager.alert('信息','兩次密碼輸入不一致!');
        $("#txt2APwd").focus();
        return false;
        }
        else if(txt2Mail.length<1)
        {
        $.messager.alert('信息','郵箱不能為空!');
        $("#txt2Mail").focus();
        return false;
        }
        else if(!state)
        {
        $.messager.alert('信息','用戶名已存在請重新注冊!');
        $("#txt2UserName").focus();
        return false;
        }
        else
        {
        return true;
        }
        })
      
      });
      // 顯示信息
         function showMessage(mes)
      {
      $(document).ready(function(){
      $.messager.alert('信息',mes);
      $("#txtUserName").foucs();
      })
      }
    posted on 2010-08-12 10:22 sanmao 閱讀(2620) 評論(2)  編輯  收藏

    FeedBack:
    # re: jquery 注冊驗證例子
    2011-03-03 08:34 | fhfh
    hfdhdh  回復  更多評論
      
    # re: jquery 注冊驗證例子
    2011-09-07 14:05 | 愛愛愛
    AA  回復  更多評論
      

    只有注冊用戶登錄后才能發(fā)表評論。


    網(wǎng)站導航:
     

    常用鏈接

    留言簿(5)

    隨筆分類

    隨筆檔案

    搜索

    •  

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 亚洲精品国产成人99久久| 亚洲色一色噜一噜噜噜| 国产午夜精品久久久久免费视 | 免费在线看v网址| 亚洲网站免费观看| 国产一卡二卡四卡免费| 亚洲av永久无码精品三区在线4| 亚洲免费观看网站| 2017亚洲男人天堂一| 暖暖免费高清日本中文| 国产天堂亚洲精品| 99久久99久久免费精品小说| 亚洲情a成黄在线观看动漫尤物| 未满十八18禁止免费无码网站| 亚洲美女大bbbbbbbbb| 免费观看的毛片大全| 亚洲av中文无码字幕色不卡| 亚洲а∨天堂久久精品| 最好免费观看高清在线| 亚洲国产电影在线观看| 日本最新免费不卡二区在线| 成年网站免费入口在线观看| 亚洲av无码成h人动漫无遮挡| 100部毛片免费全部播放完整| 亚洲精品亚洲人成在线| 亚洲精品WWW久久久久久| 无码少妇精品一区二区免费动态| 亚洲av日韩av综合| 亚洲成av人片一区二区三区| 精品国产免费一区二区三区香蕉| 亚洲av乱码一区二区三区香蕉 | 久久久精品免费国产四虎| 亚洲精品在线播放| 免费永久在线观看黄网站| 免费的全黄一级录像带| 中文字幕亚洲综合久久综合| 国产精品亚洲精品日韩已方| 国产乱子精品免费视观看片| 日本免费精品一区二区三区| 亚洲小视频在线播放| 亚洲综合激情另类专区|