User Tools

Site Tools


ajax:make_an_ajax_request_using_xmlhttprequest

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ajax:make_an_ajax_request_using_xmlhttprequest [2016/07/08 23:14] peterajax:make_an_ajax_request_using_xmlhttprequest [2020/07/15 09:30] (current) – external edit 127.0.0.1
Line 307: Line 307:
 jQuery provides several methods for performing HTTP requests, the most generic being jQuery.ajax which has broadly similar functionality to a raw XMLHttpRequest object.  There are also a number of shorthand methods providing more specialised operations: jQuery provides several methods for performing HTTP requests, the most generic being jQuery.ajax which has broadly similar functionality to a raw XMLHttpRequest object.  There are also a number of shorthand methods providing more specialised operations:
  
-|jQuery.get| method = 'GET'+|jQuery.get|method = 'GET'
-|jQuery.post| method = 'POST'+|jQuery.post|method = 'POST'
-|jQuery.getJSON| method = 'GET'; dataType = 'json'+|jQuery.getJSON|method = 'GET'; dataType = 'json'
-|jQuery.getScript| method = 'GET'; dataType = 'script'; execute script| +|jQuery.getScript|method = 'GET'; dataType = 'script'; execute script| 
-|.load| method = 'GET'; dataType = 'html'; load HTML into element|+|.load|method = 'GET'; dataType = 'html'; load HTML into element|
  
 For example, given an empty <div> element with an id of inbox: For example, given an empty <div> element with an id of inbox:
Line 354: Line 354:
  
  
-===== Further Reading =====+===== References =====
  
   * XMLHttpRequest Level 1, W3C Working Draft [http://www.w3.org/TR/XMLHttpRequest/   * XMLHttpRequest Level 1, W3C Working Draft [http://www.w3.org/TR/XMLHttpRequest/
ajax/make_an_ajax_request_using_xmlhttprequest.1468019649.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki