Home > Web Front-end > JS Tutorial > What is the difference between .post and .ajax in jquery

What is the difference between .post and .ajax in jquery

coldplay.xixi
Release: 2020-12-17 10:48:08
Original
1675 people have browsed it

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...].

What is the difference between .post and .ajax in 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 .postThe 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
    });
},
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template