{"id":2478,"date":"2014-07-09T11:38:03","date_gmt":"2014-07-09T03:38:03","guid":{"rendered":"http:\/\/kuki.idv.tw\/?p=2478"},"modified":"2014-07-09T11:38:03","modified_gmt":"2014-07-09T03:38:03","slug":"%e8%bd%89%e5%b8%96asp-net-jquery%e4%bd%bf%e7%94%a8jquery%e7%9a%84ajax%e5%ad%98%e5%8f%96%e8%b3%87%e6%96%99ashxaspxasmx","status":"publish","type":"post","link":"https:\/\/www.kuki.idv.tw\/?p=2478","title":{"rendered":"[\u8f49\u5e16][ASP.NET &#038; jQuery]\u4f7f\u7528jQuery\u7684Ajax\u5b58\u53d6\u8cc7\u6599(ashx,aspx,asmx)"},"content":{"rendered":"<p style=\"color: #6284aa;\">\u4f86\u6e90:http:\/\/www.dotblogs.com.tw\/hatelove\/archive\/2009\/12\/22\/jqueryajax.aspx<\/p>\n<h2 style=\"color: #6284aa;\"><span style=\"color: #ff8080;\">\u524d\u8a00<\/span><\/h2>\n<p style=\"color: #222222;\">\u4e4b\u524d\u6c92\u592a\u591axmlHttpRequest\u8207\u64b0\u5bebCallBack javascript\u7684\u7d93\u9a57\uff0c<br \/>\n\u4e00\u958b\u59cb\u5beb\u7a0b\u5f0f\uff0c\u5c31\u88abAJAX.NET\u7684UpdatePanel\u990a\u58de\u4e86\u3002<\/p>\n<p>\u6162\u6162\u77ad\u89e3\u5230UpdatePanel\u53ea\u662f\u500b\u507d\u88dd\u7684ajax\uff0c\u80cc\u5f8c\u4ed8\u51fa\u7684effort\u4ecd\u7136\u76f8\u7576\u9f90\u5927\u5f8c\uff0c<br \/>\n\u624d\u6162\u6162\u7684\u60f3\u53bb\u77ad\u89e3ajax\u8a72\u5982\u4f55\u64b0\u5beb\u3002<\/p>\n<p>\u60f3\u8981\u64fa\u812bAutoPostBack\u4ed8\u51fa\u7684\u9f90\u5927\u6210\u672c\uff0cjavascript\u8207ajax\u7684\u80fd\u529b\u5c31\u4e00\u5b9a\u8981\u80fd\u990a\u6210\u3002<\/p>\n<p>\u9019\u908a\u642d\u914djQuery\u7684ajax\u529f\u80fd\uff0c\u4f86\u793a\u7bc4\u4e00\u4e0b\u5728ASP.NET\u4e0a\u7684\u4f5c\u6cd5\u3002<\/p>\n<p style=\"color: #222222;\">\n<h2 style=\"color: #6284aa;\"><span style=\"color: #ff8080;\">Play it<\/span><\/h2>\n<p style=\"color: #222222;\">\u9019\u908a\u7bc4\u4f8b\u7684\u9700\u6c42\u662f\uff0c\u6211\u5011\u6709\u5169\u500btextbox\uff0c\u4e00\u500b\u662fID\uff0c\u4e00\u500b\u662fName\uff0c<br \/>\n\u7576\u8f38\u5165ID\u6539\u8b8a\u6642\uff0c\u8981\u5e36\u51faName\u7684\u8cc7\u6599\u3002(\u5b78\u6703\u4e4b\u5f8c\uff0c\u5c31\u53ef\u4ee5\u64fa\u812bAutoPostBack=true\uff0cText_Changed\u7684\u65b9\u5f0f\u5566&#8230;)<\/p>\n<p>\u5728\u9019\u88e1\u6211\u628aID\u5e36Name\u7684\u7a0b\u5f0f\u78bc\uff0c\u5206\u5225\u5beb\u5728\u4e09\u7a2e\u6a94\u6848\u4e0a\u4f86\u8655\u7406\u3002<\/p>\n<ol style=\"color: #222222;\">\n<li>.ashx(\u6cdb\u578b\u8655\u7406\u5e38\u5f0f)<\/li>\n<li>.aspx(\u4e00\u822c\u7db2\u9801\u9801\u9762)<\/li>\n<li>.asmx(Web Service)<\/li>\n<\/ol>\n<p style=\"color: #222222;\">\u70ba\u65b9\u4fbf\u5404\u4f4d\u4e0b\u8f09sample code\u5f8c\u53ef\u4ee5\u76f4\u63a5\u8dd1\uff0c<br \/>\n\u9019\u908a\u7684Name\uff0c\u5c31\u662f\u53d6first name\uff0c\u52a0\u4e0ajs\u50b3\u904e\u4f86\u7684\u7b2c\u4e8c\u500b\u53c3\u6578MiddleName\uff1a\u300emiddle\u300f\u5b57\u6a23\uff0c<br \/>\nlast name\u7684\u90e8\u5206\uff0c\u5247\u662f\u6e2c\u8a66Session\u503c\u80fd\u5426\u88abServer\u7aef\u8b80\u53d6\u5230\uff0c\u6240\u4ee5\u518d\u88dc\u4e0aSession\u7684\u503c\u300e91\u300f<span style=\"text-decoration: line-through;\">\u4f86\u7d00\u5ff5<\/span>\u4ee3\u8868\u5f9eserver\u7aef\u56de\u50b3\u7684Name\u3002<\/p>\n<p>\u4e5f\u5c31\u662fajax return\u56de\u4f86\u7684\u503c\u662f\uff1a\u756b\u9762\u4e0a\u8f38\u5165\u7684first name+\u300emiddle\u300f+ Session[\u201cLastName\u201d]<br \/>\n\u63a5\u8457\uff0c\u8b93\u6211\u5011\u7e7c\u7e8c\u770b\u4e0b\u53bb\u3002<\/p>\n<ol style=\"color: #222222;\">\n<li>.ashx\n<ul style=\"font-weight: inherit; font-style: inherit;\">\n<li>\u5148\u65b0\u589e\u4e00\u500b\u6cdb\u578b\u8655\u7406\u5e38\u5f0f\u6a94\u6848\uff0c\u8a18\u5f97\u5f15\u7528System.Web.SessionState\u8207\u5be6\u4f5cIReadOnlySessionState\uff0c\u6211\u5011\u624d\u80fd\u5728\u7a0b\u5f0f\u78bc\u88e1\u9762\u8b80\u5230Session\u3002<\/li>\n<li>\u63a5\u53c3\u6578\u7684\u90e8\u5206\uff0c\u4f7f\u7528context.Request.Form[&#8220;\u53c3\u6578\u540d\u7a31]<\/li>\n<li>\u6700\u5f8creturn\u7684\u503c\uff0c\u5247\u662f\u4f7f\u7528context.Response.Write(\u56de\u50b3\u503c)<br \/>\n<a style=\"color: #004986;\" href=\"http:\/\/files.dotblogs.com.tw\/hatelove\/0912\/ASP.NETjQueryjQueryAjax_12C1D\/ashx_2.png\"><img decoding=\"async\" loading=\"lazy\" title=\"ashx\" src=\"http:\/\/files.dotblogs.com.tw\/hatelove\/0912\/ASP.NETjQueryjQueryAjax_12C1D\/ashx_thumb.png\" alt=\"ashx\" width=\"689\" height=\"397\" border=\"0\" \/><\/a><\/li>\n<\/ul>\n<\/li>\n<li>.aspx\n<ul style=\"font-weight: inherit; font-style: inherit;\">\n<li>\u5148\u65b0\u589e\u4e00\u500b.aspx\uff0c\u63a5\u8457\u53ea\u4fdd\u7559\u7b2c\u4e00\u884c&lt;%@ Page %&gt;\u90a3\u884c<\/li>\n<li>\u5728Page_Load\u7684\u4e8b\u4ef6\u64b0\u5beb\u8981\u8655\u7406\u7684\u7a0b\u5f0f\u78bc<\/li>\n<li>\u63a5\u53c3\u6578\u7684\u90e8\u5206\uff0c\u4f7f\u7528\u7684\u662fRequest.Form[&#8220;\u53c3\u6578\u540d\u7a31]<\/li>\n<li>\u6700\u5f8creturn\u7684\u503c\uff0c\u5247\u662f\u76f4\u63a5Response.Write(\u56de\u50b3\u503c)<br \/>\n<a style=\"color: #004986;\" href=\"http:\/\/files.dotblogs.com.tw\/hatelove\/0912\/ASP.NETjQueryjQueryAjax_12C1D\/aspx_2.png\"><img decoding=\"async\" loading=\"lazy\" title=\"aspx\" src=\"http:\/\/files.dotblogs.com.tw\/hatelove\/0912\/ASP.NETjQueryjQueryAjax_12C1D\/aspx_thumb.png\" alt=\"aspx\" width=\"652\" height=\"260\" border=\"0\" \/><\/a><\/li>\n<\/ul>\n<\/li>\n<li>.asmx\n<ul style=\"font-weight: inherit; font-style: inherit;\">\n<li>\u5148\u65b0\u589e\u4e00\u500b.asmx\uff0c\u63a5\u8457\u628a[System.Web.Script.Services.ScriptService]\u53d6\u6d88\u8a3b\u89e3<\/li>\n<li>\u65b0\u589e\u4e00\u500bpublic\u7684method\uff0c\u53eb\u505aGetFullName\uff0cmethod\u4e0a\u982d\u52a0\u4e0a[WebMethod(EnableSession=true)]\uff0c\u624d\u80fd\u4f7f\u7528Session<\/li>\n<li>return\u7684\u8cc7\u6599\u76f4\u63a5return\u5373\u53ef\uff0c\u96d6\u7136return\u7684\u578b\u5225\u662fstring\uff0c\u4f46\u662fjavascript\u5be6\u969b\u63a5\u5230\u7684\u662fxml\u683c\u5f0f\u7684\u5b57\u4e32<br \/>\n<a style=\"color: #004986;\" href=\"http:\/\/files.dotblogs.com.tw\/hatelove\/0912\/ASP.NETjQueryjQueryAjax_12C1D\/asmx_2.png\"><img decoding=\"async\" loading=\"lazy\" title=\"asmx\" src=\"http:\/\/files.dotblogs.com.tw\/hatelove\/0912\/ASP.NETjQueryjQueryAjax_12C1D\/asmx_thumb.png\" alt=\"asmx\" width=\"681\" height=\"418\" border=\"0\" \/><\/a><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p style=\"color: #222222;\">\u6709\u4e86\u9019\u4e09\u7a2e\u8655\u7406ID\u56de\u50b3Name\u7684\u7a0b\u5f0f\u5f8c\uff0c<br \/>\n\u4f86\u770b\u770b\u6211\u5011\u7684\u9801\u9762\u8981\u600e\u9ebc\u64b0\u5beb\u3002<\/p>\n<p style=\"color: #222222;\">\u7db2\u9801\u7684\u90e8\u5206\uff0c\u7528\u4e09\u7d44\u4f86\u7576\u8a66\u9a57\uff1a<\/p>\n<div id=\"scid:812469c5-0cb0-4c63-8c15-c81123a09de7:49e8a1db-b9ed-46d7-a901-148c6cf37638\" class=\"wlWriterEditableSmartContent\" style=\"color: #222222;\">\n<div id=\"highlighter_121174\" class=\"syntaxhighlighter  \">\n<div class=\"lines\">\n<div class=\"line alt1\">\n<table>\n<tbody>\n<tr>\n<td class=\"number\" style=\"color: #afafaf !important;\"><code>01<\/code><\/td>\n<td class=\"content\"><code class=\"plain\">&lt;<\/code><code class=\"keyword\" style=\"font-weight: bold !important; color: #006699 !important;\">body<\/code><code class=\"plain\">&gt;<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"line alt2\">\n<table>\n<tbody>\n<tr>\n<td class=\"number\" style=\"color: #afafaf !important;\"><code>02<\/code><\/td>\n<td class=\"content\"><code class=\"spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain\">&lt;<\/code><code class=\"keyword\" style=\"font-weight: bold !important; color: #006699 !important;\">form<\/code>\u00a0<code class=\"color1\" style=\"color: #808080 !important;\">id<\/code><code class=\"plain\">=<\/code><code class=\"string\" style=\"color: blue !important;\">\"form1\"<\/code>\u00a0<code class=\"color1\" style=\"color: #808080 !important;\">runat<\/code><code class=\"plain\">=<\/code><code class=\"string\" style=\"color: blue !important;\">\"server\"<\/code><code class=\"plain\">&gt;<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"line alt1\">\n<table>\n<tbody>\n<tr>\n<td class=\"number\" style=\"color: #afafaf !important;\"><code>03<\/code><\/td>\n<td class=\"content\"><code class=\"spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain\">&lt;<\/code><code class=\"keyword\" style=\"font-weight: bold !important; color: #006699 !important;\">div<\/code><code class=\"plain\">&gt;<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"line alt2\">\n<table>\n<tbody>\n<tr>\n<td class=\"number\" style=\"color: #afafaf !important;\"><code>04<\/code><\/td>\n<td class=\"content\"><code class=\"spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain\">.ashx: first name&lt;<\/code><code class=\"keyword\" style=\"font-weight: bold !important; color: #006699 !important;\">asp:TextBox<\/code>\u00a0<code class=\"color1\" style=\"color: #808080 !important;\">ID<\/code><code class=\"plain\">=<\/code><code class=\"string\" style=\"color: blue !important;\">\"txtIDbyAshx\"<\/code>\u00a0<code class=\"color1\" style=\"color: #808080 !important;\">runat<\/code><code class=\"plain\">=<\/code><code class=\"string\" style=\"color: blue !important;\">\"server\"<\/code><code class=\"plain\">&gt;&lt;\/<\/code><code class=\"keyword\" style=\"font-weight: bold !important; color: #006699 !important;\">asp:TextBox<\/code><code class=\"plain\">&gt;<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"line alt1\">\n<table>\n<tbody>\n<tr>\n<td class=\"number\" style=\"color: #afafaf !important;\"><code>05<\/code><\/td>\n<td class=\"content\"><code class=\"spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain\">full name&lt;<\/code><code class=\"keyword\" style=\"font-weight: bold !important; color: #006699 !important;\">asp:TextBox<\/code>\u00a0<code class=\"color1\" style=\"color: #808080 !important;\">ID<\/code><code class=\"plain\">=<\/code><code class=\"string\" style=\"color: blue !important;\">\"txtNamebyAshx\"<\/code>\u00a0<code class=\"color1\" style=\"color: #808080 !important;\">runat<\/code><code class=\"plain\">=<\/code><code class=\"string\" style=\"color: blue !important;\">\"server\"<\/code><code class=\"plain\">&gt;&lt;\/<\/code><code class=\"keyword\" style=\"font-weight: bold !important; color: #006699 !important;\">asp:TextBox<\/code><code class=\"plain\">&gt;&lt;<\/code><code class=\"keyword\" style=\"font-weight: bold !important; color: #006699 !important;\">br<\/code>\u00a0<code class=\"plain\">\/&gt;<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"line alt2\">\n<table>\n<tbody>\n<tr>\n<td class=\"number\" style=\"color: #afafaf !important;\"><code>06<\/code><\/td>\n<td class=\"content\"><code class=\"spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"line alt1\">\n<table>\n<tbody>\n<tr>\n<td class=\"number\" style=\"color: #afafaf !important;\"><code>07<\/code><\/td>\n<td class=\"content\"><code class=\"spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain\">.aspx: first name&lt;<\/code><code class=\"keyword\" style=\"font-weight: bold !important; color: #006699 !important;\">asp:TextBox<\/code>\u00a0<code class=\"color1\" style=\"color: #808080 !important;\">ID<\/code><code class=\"plain\">=<\/code><code class=\"string\" style=\"color: blue !important;\">\"txtIDbyAspx\"<\/code>\u00a0<code class=\"color1\" style=\"color: #808080 !important;\">runat<\/code><code class=\"plain\">=<\/code><code class=\"string\" style=\"color: blue !important;\">\"server\"<\/code><code class=\"plain\">&gt;&lt;\/<\/code><code class=\"keyword\" style=\"font-weight: bold !important; color: #006699 !important;\">asp:TextBox<\/code><code class=\"plain\">&gt;<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"line alt2\">\n<table>\n<tbody>\n<tr>\n<td class=\"number\" style=\"color: #afafaf !important;\"><code>08<\/code><\/td>\n<td class=\"content\"><code class=\"spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain\">full name&lt;<\/code><code class=\"keyword\" style=\"font-weight: bold !important; color: #006699 !important;\">asp:TextBox<\/code>\u00a0<code class=\"color1\" style=\"color: #808080 !important;\">ID<\/code><code class=\"plain\">=<\/code><code class=\"string\" style=\"color: blue !important;\">\"txtNamebyAspx\"<\/code>\u00a0<code class=\"color1\" style=\"color: #808080 !important;\">runat<\/code><code class=\"plain\">=<\/code><code class=\"string\" style=\"color: blue !important;\">\"server\"<\/code><code class=\"plain\">&gt;&lt;\/<\/code><code class=\"keyword\" style=\"font-weight: bold !important; color: #006699 !important;\">asp:TextBox<\/code><code class=\"plain\">&gt;&lt;<\/code><code class=\"keyword\" style=\"font-weight: bold !important; color: #006699 !important;\">br<\/code>\u00a0<code class=\"plain\">\/&gt;<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"line alt1\">\n<table>\n<tbody>\n<tr>\n<td class=\"number\" style=\"color: #afafaf !important;\"><code>09<\/code><\/td>\n<td class=\"content\"><code class=\"spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"line alt2\">\n<table>\n<tbody>\n<tr>\n<td class=\"number\" style=\"color: #afafaf !important;\"><code>10<\/code><\/td>\n<td class=\"content\"><code class=\"spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain\">.ashx: first name&lt;<\/code><code class=\"keyword\" style=\"font-weight: bold !important; color: #006699 !important;\">asp:TextBox<\/code>\u00a0<code class=\"color1\" style=\"color: #808080 !important;\">ID<\/code><code class=\"plain\">=<\/code><code class=\"string\" style=\"color: blue !important;\">\"txtIDbyAsmx\"<\/code>\u00a0<code class=\"color1\" style=\"color: #808080 !important;\">runat<\/code><code class=\"plain\">=<\/code><code class=\"string\" style=\"color: blue !important;\">\"server\"<\/code><code class=\"plain\">&gt;&lt;\/<\/code><code class=\"keyword\" style=\"font-weight: bold !important; color: #006699 !important;\">asp:TextBox<\/code><code class=\"plain\">&gt;<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"line alt1\">\n<table>\n<tbody>\n<tr>\n<td class=\"number\" style=\"color: #afafaf !important;\"><code>11<\/code><\/td>\n<td class=\"content\"><code class=\"spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain\">full name&lt;<\/code><code class=\"keyword\" style=\"font-weight: bold !important; color: #006699 !important;\">asp:TextBox<\/code>\u00a0<code class=\"color1\" style=\"color: #808080 !important;\">ID<\/code><code class=\"plain\">=<\/code><code class=\"string\" style=\"color: blue !important;\">\"txtNamebyAsmx\"<\/code>\u00a0<code class=\"color1\" style=\"color: #808080 !important;\">runat<\/code><code class=\"plain\">=<\/code><code class=\"string\" style=\"color: blue !important;\">\"server\"<\/code><code class=\"plain\">&gt;&lt;\/<\/code><code class=\"keyword\" style=\"font-weight: bold !important; color: #006699 !important;\">asp:TextBox<\/code><code class=\"plain\">&gt;&lt;<\/code><code class=\"keyword\" style=\"font-weight: bold !important; color: #006699 !important;\">br<\/code>\u00a0<code class=\"plain\">\/&gt;<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"line alt2\">\n<table>\n<tbody>\n<tr>\n<td class=\"number\" style=\"color: #afafaf !important;\"><code>12<\/code><\/td>\n<td class=\"content\"><code class=\"spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain\">&lt;\/<\/code><code class=\"keyword\" style=\"font-weight: bold !important; color: #006699 !important;\">div<\/code><code class=\"plain\">&gt;<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"line alt1\">\n<table>\n<tbody>\n<tr>\n<td class=\"number\" style=\"color: #afafaf !important;\"><code>13<\/code><\/td>\n<td class=\"content\"><code class=\"spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain\">&lt;\/<\/code><code class=\"keyword\" style=\"font-weight: bold !important; color: #006699 !important;\">form<\/code><code class=\"plain\">&gt;<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"line alt2\">\n<table>\n<tbody>\n<tr>\n<td class=\"number\" style=\"color: #afafaf !important;\"><code>14<\/code><\/td>\n<td class=\"content\"><code class=\"plain\">&lt;\/<\/code><code class=\"keyword\" style=\"font-weight: bold !important; color: #006699 !important;\">body<\/code><code class=\"plain\">&gt;<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p style=\"color: #222222;\">\u63a5\u8457\u4f7f\u7528jQuery\u7684ajax\u529f\u80fd\uff0c\u6ce8\u610f\u7684\u5730\u65b9\uff1a<\/p>\n<ol style=\"color: #222222;\">\n<li>\u8a3b\u518a\u5728change\u4e8b\u4ef6<\/li>\n<li>ajax option:\n<ul style=\"font-weight: inherit; font-style: inherit;\">\n<li>type\uff1a\u4f7f\u7528post<\/li>\n<li>url\u7684\u90e8\u5206\uff0cweb service\u9700\u52a0\u4e0amethod\u540d\u7a31<\/li>\n<li>\u50b3\u5165\u53c3\u6578\u7684\u90e8\u5206\uff0c\u53ef\u7528json\uff0c\u6216\u4e00\u822c\u5b57\u4e32\u4f7f\u7528\u300e&amp;\u300f\u4e32\u63a5\uff0c\u5982\u540c\u4e00\u822c\u7684post\u6216QueryString<\/li>\n<li>ajax\u6210\u529f\u7684\u8a71\uff0c\u6703\u9032\u5165success\uff0c\u5931\u6557\u6703\u9032\u5165error<\/li>\n<li>\u6210\u529f\u56de\u50b3\u7684\u5b57\u4e32\uff0c\u5728success\u7684function(\u56de\u50b3\u503c)<\/li>\n<li>web service\u56de\u50b3\u70baXML\u683c\u5f0f\uff0c\u9700\u81ea\u884cparse\u4f7f\u7528<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p style=\"color: #222222;\"><a style=\"color: #004986;\" href=\"http:\/\/files.dotblogs.com.tw\/hatelove\/0912\/ASP.NETjQueryjQueryAjax_12C1D\/jQuery_2.png\"><img decoding=\"async\" loading=\"lazy\" title=\"jQuery\" src=\"http:\/\/files.dotblogs.com.tw\/hatelove\/0912\/ASP.NETjQueryjQueryAjax_12C1D\/jQuery_thumb.png\" alt=\"jQuery\" width=\"804\" height=\"694\" border=\"0\" \/><\/a><\/p>\n<p style=\"color: #222222;\">\n<h2 style=\"color: #6284aa;\"><span style=\"color: #ff8080;\">\u7d50\u8ad6<\/span><\/h2>\n<p style=\"color: #222222;\">ajax\u7684\u80fd\u529b\u672a\u4f86\u4e00\u5b9a\u5f97\u5177\u5099\uff0c\u56e0\u70ba\u4e0d\u7ba1\u662f\u4e00\u822c\u7684html\u3001\u756b\u9762\u5197\u91cd\u7684Web form\u3001\u6216\u662fASP.NET MVC\uff0c<br \/>\n\u8981\u7b49\u5f85Post\u7684\u904e\u7a0b\uff0c\u5c0dUser\u4f86\u8aaa\u90fd\u662f\u7a2e\u6298\u78e8\u3002<\/p>\n<p>\u65e2\u7136\u6c92\u6709\u591a\u96e3\uff0c\u5c31\u9806\u624b\u628a\u5b83\u5b78\u8d77\u4f86\u5427\uff01<\/p>\n<p style=\"color: #222222;\">In 91 it!!<\/p>\n<p style=\"color: #222222;\">Sample Code:\u00a0<a style=\"color: #004986;\" href=\"http:\/\/files.dotblogs.com.tw\/hatelove\/0912\/20091222214855548.zip\">jQueryAjax.zip<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f86\u6e90:http:\/\/www.dotblogs.com.tw\/hatelove\/archive\/2009\/12\/ &hellip; <a href=\"https:\/\/www.kuki.idv.tw\/?p=2478\" class=\"more-link\">\u95b1\u8b80\u5168\u6587<span class=\"screen-reader-text\">\u3008[\u8f49\u5e16][ASP.NET &#038; jQuery]\u4f7f\u7528jQuery\u7684Ajax\u5b58\u53d6\u8cc7\u6599(ashx,aspx,asmx)\u3009<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.kuki.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/2478"}],"collection":[{"href":"https:\/\/www.kuki.idv.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kuki.idv.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kuki.idv.tw\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kuki.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2478"}],"version-history":[{"count":1,"href":"https:\/\/www.kuki.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/2478\/revisions"}],"predecessor-version":[{"id":2479,"href":"https:\/\/www.kuki.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/2478\/revisions\/2479"}],"wp:attachment":[{"href":"https:\/\/www.kuki.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2478"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kuki.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2478"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kuki.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2478"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}