我想为Ajax.Response()
.
像这样:
AjaxGet = function(url) {
ar = new Ajax.Request(url,
{ onSuccess: function(transport) {
alert(transport.responseText);
return transport.responseText;
}
});
return ar.responseText;
}
以便
title = AjaxGet('/favouriteMovie?horrors=true')
将存储到title
Ajax 请求的可变结果。但是上面的函数代码不起作用,不返回responseText