jQuery-$.post 的路徑問題

$.post("call/ajax.php",{username:username.value,password:password.value,aj_tp:2},function(res){
    if (res == 'true') {
        $('#notice').html('<font color="#060" size="11px">登錄成功</font>');
    } else {
        $('#notice').html('用戶名或密碼不正確');
    }
}); // 這裏的 URL "call/ajax.php" 不是相對於 js 文件,而是相對於調用這個 js 文件的那個文件
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章