1
현재 모바일 응용 프로그램 로그인을 완료하려고하고 있으며 내 아약스의 성공 기능을 구문 분석하는 데 문제가 있습니다. 어떤 도움을 주셔서 감사합니다.모바일 응용 프로그램 구문 분석 로그인 결과
$(document).ready(function() {
//event handler for submit button
$("#btnSubmit").click(function() {
//collect userName and password entered by users
var username = $("#username").val();
var password = $("#password").val();
//call the authenticate function
authenticate(username, password);
});
});
//authenticate function to make ajax call
function authenticate(username, password) {
$.ajax
({
type: "POST",
//the url where you want to sent the userName and password to
url: "http://my-domain.com/php/jsonserver.php?func=Login",
dataType: 'json',
async: false,
//json object to sent to the authentication url
data: '{"username"="' + username + '", "password"="' + password + '"}',
success: function() {
//do any process for successful authentication here
}
})
}
문제가 무엇 :
이 내가 사용하는 결국 무엇인가? – Prisoner
나는 성공 함수에서 결과를 파싱 할 필요가 있지만 어디에서 시작할 것인지를 알 필요가 있음을 안다. 또한 다음 페이지로 이동하기 전에 쿠키에 세션 ID를 저장해야합니다. –