jQuery Mobile Question:
Download Job Interview Questions and Answers PDF
Explain various methods to make ajax request in jQuery?
Answer:
Using below jQuery methods, you can make ajax calls:
► load() : Load a piece of html into a container DOM
► $.getJSON(): Load JSON with GET method.
► $.getScript(): Load a JavaScript file.
► $.get(): Use to make a GET call and play extensively with the response.
► $.post(): Use to make a POST call and don't want to load the response to some container DOM.
► $.ajax(): Use this to do something on XHR failures, or to specify ajax options (e.g. cache: true) on the fly.
► load() : Load a piece of html into a container DOM
► $.getJSON(): Load JSON with GET method.
► $.getScript(): Load a JavaScript file.
► $.get(): Use to make a GET call and play extensively with the response.
► $.post(): Use to make a POST call and don't want to load the response to some container DOM.
► $.ajax(): Use this to do something on XHR failures, or to specify ajax options (e.g. cache: true) on the fly.
Download jQuery Mobile Interview Questions And Answers
PDF
Previous Question | Next Question |
Is it possible to use jQuery to make ajax request? | Explain deferred and promise object in jQuery? |