add xhr
This commit is contained in:
9
~/JavaScript/xhrPostForm.js
Normal file
9
~/JavaScript/xhrPostForm.js
Normal file
@ -0,0 +1,9 @@
|
||||
let data = new FormData();
|
||||
|
||||
data.append('item_id', 1);
|
||||
data.append('image_name', 'NAME');
|
||||
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', '/v.php?type=image_delete', true);
|
||||
xhr.onload = function() { console.log(this.responseText); };
|
||||
xhr.send(data);
|
Reference in New Issue
Block a user