jQuery AJAXLesson 28Free preview
jQuery Get/Post
This lesson is part of jQuery · All levels
Summary
The $.get() and $.post() methods are two shortcuts for requesting data with their respective HTTP methods. $.get() is used to read data, while $.post() is used to send data as a form result. If more detail is needed, both can be replaced with $.ajax() which has many options.
Key points
- $.get() makes a request to read data to the server
- $.post() sends data to the server, suitable for submitting forms
- Successful callback receives response data
- Both receive additional data parameters for the request
- $.ajax() is used when a method, header, or error specification is needed
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.