Simple Example of the $. post () method in jquery _ jquery

Source: Internet
Author: User
This article focuses on $. A simple example of the post () method is introduced. If you need a friend, you can refer to it and hope to help you with this method in jqery, $. post () Below is a simple example of this method:

JQuery. post (url, [data], [callback], [type]):
Use POST for asynchronous requests

Parameters:

Url (String ):The URL of the request.

Data (Map ):(Optional) data to be sent to the server, expressed in Key/value pairs.

Callback (Function ):(Optional) callback function when loading is successful (this method is called only when the Response returns success ).

Type (String ):(Optional) official description: Type of data to be sent. In fact, it should be the client request type (JSON, XML, and so on)

1.html page (index.html)

The Code is as follows:






Untitled Document

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.