Answer the question
In order to leave comments, you need to log in
How to add the response received from the server to a div?
For example, I received a response from the server through ajax. But now I need to add it in div
how to do it?
Answer the question
In order to leave comments, you need to log in
fetch('something from server')
.then(response => response.json())
.then(data => {
let div = document.querySelector('desired div') ;
div.append(data)
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question