Prototype AJAX

 
var url = "ajax.php";
var content = "
  
   
    1
   
  ";

new Ajax.Request(url, {   
    method: 'post',
    contentType: 'application/xml',
    postBody: content,
    onSuccess: function(e) 
    {
        alert(e.responseText);
    },
    onFailure: function(e)
    {
        alert('ERROR');
    }
}); 

 

prototype的ajax例子,用来复制的

你可能感兴趣的:(Ajax,function,prototype,url)