var username = $('#username');url="/index.php/login";$.post(url,{username:username.val(),type:'ajax'},function(result){if(result==1){$('#user_span').css('color','red');$('#user_span').html('用戶名已存在');return false;}$(function(){$('#reg').live('submit',function(){checku();//這里有個(gè)函數(shù)var password=$('input[name="password"]');var confirm=$('input[id="confirm"]');//密碼驗(yàn)證if(password.val()==""){password.next().css('color','red');password.next().html('密碼不能為空');return false;}else{// 執(zhí)行成功}//我點(diǎn)擊submit時(shí)候checku()還沒執(zhí)行完,下面已經(jīng)執(zhí)行完
- 1 回答
- 0 關(guān)注
- 2434 瀏覽
添加回答
舉報(bào)
0/150
提交
取消