Simple example of jquery ajax request

jquery ajax parameter explanation URL: click to view

        $.ajax({
            type: "post",
            url: "url",
            data: {
                "id": id
            },
            async: true , // Asynchronous request 
            cache: false , // Set to false will not cache this page 
            dataType: 'json', // Return object 
            success: function (data) {
                console.log(data);
            },
            error: function (data) {
                 // Request failed function 
                console.log(data);
            }
        })

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325249275&siteId=291194637