界面: 复制代码 代码如下: <BR>$(document).ready(function () { <BR>$("#b01").click(function () { <BR>htmlobj = $.ajax({ url: "/Content/upFile/测试.txt", async: false }); <BR>$("#div01").html(htmlobj.responseText); <BR>}); <BR>}); <br><br>$(document).ready(function () { <BR>$("#test").load("/Content/upFile/测试2.txt #p1", function (responseTxt, statusTxt, xhr) { <BR>if (statusTxt == "success") <BR>alert("外部内容加载成功!" + xhr); <BR>if (statusTxt == "error") <BR>alert("Error: " + xhr.status + ": " + xhr.statusText); <BR>}); <BR>}); <br><br>$(document).ready(function () { <BR>$("#getbutton").click(function () { <BR>$.get("/DownSet/index", function (data, status) { <BR>alert("数据:" + data + "\n状态:" + status); <BR>}); <BR>}); <BR>}); <br><br>$(document).ready(function () { <BR>$("#postbutton").click(function () { <BR>$.get("/CustomerInformation/getS", { par: "ww" }, function (data, status) { <BR>alert("数据:" + data + "\n状态:" + status); <BR>$("#postText").html(data); <BR>}); <BR>}); <BR>}); <br><br> post方法加载文本后 会在这里显示 get方法加载文本后 会在这里显示 jquery load方法加载的显示在这里 加载文本后 会在这里显示 加载文本后 会在这里显示 后台: 复制代码 代码如下: public string getS(string par) { string content = ""; if (par.Equals("ww")) { content = "cheng gong le"; } else { content = "shi bai le"; } return content; }