Joke Collection Website - Public benefit messages - How does ASP.NET use jQuery to obtain verification code across domains and verify it?

How does ASP.NET use jQuery to obtain verification code across domains and verify it?

Just put jquery- 1.4.2.min.js or jquery- 1.3. * in the project folder. min。 js。 Reference in aspx.

& lt script & gt

Function LoadData ()

{

$.ajax({

Type: Get,

Website: "* * * *. aspx“,

Data: "type = test Ajax & amp num ="+math.random (),

Success: Function (Message)

{

Background data message

}

});

}

& lt script & gt

Trigger the event method above.

* * * * * *。 aspx。 cs

Protected void Page_Load (object sender, EventArgs e)

{

If (requested. Query ["type"] = = "testajax")

{

//Your logical processing

//Finally, you only need to add the following.

Response. content type =“text/plain“;

Response. Buffer = true

Response. ExpiresAbsolute = date and time. now . AddDays(- 1);

Response. add header(“pragma“,“no-cache“);

Response. add header(“cache-control“,““);

Response. cache control =“no-cache“;

//result The value to return to the page.

Response. Write (results);

Response. end();

}

}

I can help you. After you set my best answer, I will teach you Baidu Hii.