【JS】Intermediate8:jQuery:AJAX

1.$.ajax is the main method, allowing you to manually construct your AJAX request

 

2.eg: gets some data from a server

【JS】Intermediate8:jQuery:AJAX

a function to be called when the data is retrieved, named the success callback.

 

control over how data is sent

【JS】Intermediate8:jQuery:AJAX

 

3.$.get  eg:

【JS】Intermediate8:jQuery:AJAX

 

3.$.post  eg:

【JS】Intermediate8:jQuery:AJAX

The second argument is the data to be sent - it can be almost anything except a function: jQuery will figure out how to send it for you

 

你可能感兴趣的:(jquery)