0

I am coding a simple flask project using AJAX. I am getting a var question that I want to display in a div #chatbox. Whenever I run the code, question is logged into my console, but on my web-page, the string "question" is displayed in my div #chatbox.

var question = data['response']
console.log(question)
$( "#chatbox" ).append( "<p>question</p>" ); 

What is the proper way to append a div with a var in it?

Toto Briac
  • 908
  • 9
  • 29

0 Answers0