const bodyFormData = new FormData();
bodyFormData.set('data', JSON.stringify({
url: this.url,
test: 'test'
}));
axios({
method: 'post',
url: '/ajax/data.php',
data: bodyFormData,
})
axios.post(
'/ajax/data.php',
'data=' + JSON.stringify({
url: this.url,
test: 'test'
})
)
$data = json_decode( html_entity_decode( stripslashes ($_POST['data']) ) );
echo json_encode($data);
var self = this;
self.callback = $(".class");
_.each(self.callback.find("item"), function (e) {
//some code
});
self.callback.find(".class2").before('<div class="class3""></div>')