AJAX Introduction
AJAX loads data from the server without reloading the page. jQuery offers $.ajax, $.get, $.post and $.getJSON. Network requests are shown as code only.
Example
$.ajax({
url: '/api/items',
method: 'GET',
dataType: 'json',
success: function (data) { console.log(data); },
error: function () { console.log('failed'); }
});Exercise
Request method.
method: ''
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.