0
我在下面的函數中有一個問題。我不明白爲什麼參數「data」會返回「1」,「2」和「3」。請幫忙解釋一下。謝謝。JSP函數返回一些奇怪的值
function submitRegistrationForm() {
var queryString = $('#registerForm').formSerialize();
$.post('../member/registration.do?method=register&key=<%=RandomStringUtils.randomAlphanumeric(64) %>', queryString, function(data) {
if (data != ''&& data !='1'&& data !='2'&& data !='3'){
var arr = data.split('-');
var urlstr = '../member/registration.do?method=regisration&key=<%=RandomStringUtils.randomAlphanumeric(64) %>&altId='+trim(arr[0])+'&vipKo='+arr[1];
parent.window.location.href = urlstr;
parent.$.fancybox.close();
}else if(data == "1"){
$('#errorMessage2').html("INVALID MEMBER NO.");
}else if(data == "2"){
$('#errorMessage2').html("THE MEMBER NO. HAS VOIDED");
}
else if(data == "3"){
$('#errorMessage2').html("THIS MEMBER NO. HAS ALREADY REGISTERED");
}
});
}