CI 非同步驗證

來源:互聯網
上載者:User

標籤:style   blog   color   os   io   ar   div   cti   log   

 1          $("#em").bind({ 2              focus:function(){ 3                  var val=$(this).val(); 4                  if(val==""){ 5                       6                      $("#em_dl").addClass(‘focus‘); 7                  }else{ 8                       9                      $("#em_dl").removeClass(‘focus‘);10                  }11             },12             blur:function(){13                 var val=$(this).val();14                     if(val==""){15                      $("#em_dl").addClass(‘focus‘);16                  }else{17                      18                      $("#em_dl").removeClass(‘focus‘);19                  }20                     /*****非同步驗證*****/21                     //提交路徑22                     var url="<?php echo site_url(‘home/login/login_check_name‘); ?>";23                     //post提交24                     $.post(url,{em:val},function(data){25                         alert(data);26                         //判讀狀態27                         if(data>0){28                             alert(‘11‘);29                         }else{30                             alert(‘no‘);31                         }32                     }); 33              }34          });
1     #檢查郵箱是否存在2     public function login_check_name(){3         echo "1";4 5         //$em=$this->input->post(‘em‘);6         //p($em);die;7         //$data=$this->login->login_check_name($email);8     }

 

CI 非同步驗證

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.