Home > Article > Web Front-end > What is the difference between .post and .ajax in jquery
The difference between .post and .ajax in jquery is that the bottom layer of [.post] is implemented by [.ajax]. The two have a parent-child relationship, and the code is [post: function( url, data, callback, type ) {if (jQuery...].
The operating environment of this tutorial: windows7 system, jquery3.2.1 version, this method is suitable for all brands of computers.
Recommendation: jquery video tutorial
The difference between .post and .ajax in jquery is .post
The bottom layer consists of .ajax
Implemented.
.post source code:
post: function( url, data, callback, type ) { if ( jQuery.isFunction( data ) ) { callback = data; data = {}; } return jQuery.ajax({ type: "POST", url: url, data: data, success: callback, dataType: type }); },
Related free learning recommendations: javascript (video)
The above is the detailed content of What is the difference between .post and .ajax in jquery. For more information, please follow other related articles on the PHP Chinese website!