日期:2014-05-16 浏览次数:20377 次
$.ajax({ type: "GET", url: "http://www.baidu.com", dataType:"html", beforeSend: function(XMLHttpRequest){ $("#area").html("sending request..."); }, success: function(data, textStatus){ $("#ajax").html(data); }, complete: function(XMLHttpRequest, textStatus){ $("#area").html("complete request..."); }, error: function(){ $("#area").html("error occurs..."); } });
<div id="ajax"> <div id="area"></div>