您可以尝试以下方法:
$.ajax({ url: "test.html", cache: false, success: function(html){ $("#results").append(html); }});此代码会将
test.html文件内容附加到
#results元素
您可以在jQuery网站上找到更多信息。
更新:
使用此代码发送POST数据并输出结果。
var menuId = $("ul.nav").first().attr("id");var request = $.ajax({ url: "script.php", type: "POST", data: {id : menuId}, dataType: "html"});request.done(function(msg) { $("#log").html( msg );});request.fail(function(jqXHR, textStatus) { alert( "Request failed: " + textStatus );});

![用于发布和获取的Ajax教程[关闭] 用于发布和获取的Ajax教程[关闭]](http://www.mshxw.com/aiimages/31/387546.png)
