日期:2014-05-16  浏览次数:20371 次

Javascript如何发送一个Ajax请求?
代码:
new Ajax.Request('/your_url'),
{
method : ‘get',
onSuccess : function(transport){
var response = transport.responseText || “no response text”;
alert(”Success!”);
} ,
onFailure : function(){ alert('failure')}
});