1.发送Ajax请求
function sendRequest() {
var pars = document.RegisterForm.email.value;
var url = "ajax.do?email="+pars;
var mailAjax = new Ajax.Request(
url,
{
method: 'get',
onComplete: jsonResponse
}
);
}
2.处理返回结果
function jsonResponse(originalRequest) {
var myobj = originalRequest.responseText.evalJSON(true);
}