Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function updatePost() {
- fetch(`/edit/${document.getElementById('id').value}`, {
- method: 'post',
- headers: {
- 'Accept': 'application/json',
- 'Content-Type': 'application/json'
- },
- body: JSON.stringify({
- title: document.getElementById('title').value,
- content: document.getElementById('content').value
- })
- }).then(function(response) {
- console.log('tjena fixk');
- })
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement