天天看點

把ajax放在background執行,ajax不執行

String path = request.getContextPath();

String basePath = request.getScheme() + "://"

+ request.getServerName() + ":" + request.getServerPort()

+ path + "/";

String param = request.getParameter("param");

%>

//重載視窗

function resetwindow(){

if(top.location != self.location){

top.location.href = self.location.href;

return true;

}

}

$().ready(function() {

$("#form").validate();

});

//判斷使用者密碼是否正确或是否被禁用

function checksubmit()

{

//得到值

var chain_no=$("#chain_no").val();

var pwd=$("#user_password").val();

var user_id=$("#user_id").val();

$.ajax({

type: "POST",

url:"AjaxUpdate/AjaxUpdate_ajaxselectuserInfo",

data:"conditionKey="+chain_no+"&conditionValue="+pwd+"&key="+user_id,

success:function(message){

//判斷

if(message=="成功"){

$("#form").submit();

}else{

alert(message);

}

}

});

}

>

把ajax放在background執行,ajax不執行
>
未登入或賬号密碼錯誤
歡迎使用背景管理系統
連鎖編号:
賬戶編号:
賬戶密碼:
height="23">
把ajax放在background執行,ajax不執行

為什麼我點選登入按鈕,他不會執行ajax請求;而且alert(message)輸出的還是上一個頁面的所有的html的代碼!!!