Home > Web Front-end > JS Tutorial > Jquery Ajax learning example makes a request to the page and returns data in XML format_jquery

Jquery Ajax learning example makes a request to the page and returns data in XML format_jquery

WBOY
Release: 2016-05-16 18:32:27
Original
1120 people have browsed it
1. AjaxSample.aspx

Processes business data and generates XML data for JqueryRequest.aspx to call. The code is as follows:
Copy Code The code is as follows:

protected void Page_Load(object sender, EventArgs e)
{
string uid = Request.QueryString["username"] ;
string pwd = Request.QueryString["password"];

Response.ContentType = "application/xml";
Response.Charset = "utf-8";

Response.Write("");
Response.Write(@"");
Response.Write (@"");
Response.Write(@"Xuhui District, Shanghai");
Response.Write(@"
");
Response.Write(@"
");

Response.End();
}

2. JqueryRequest.aspx

Request AjaxSample.aspx by clicking the button to obtain XML data. The code is as follows:
Jquery Ajax learning example makes a request to the page and returns data in XML format_jquery
Copy code The code is as follows:
























Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template