Answer the question
In order to leave comments, you need to log in
How to display chatbot log/history?
Hello everyone, and here's what we have:
<body>
<div class='container'>
<h1>m.ru</h1>
<p>Вопрос:</p>
<input class="brd1" type="text" size="30" id="user" onkeydown="ask(event,this);">
<p>Ответ:</p>
<div id='answer' class='answer brd1'>
</div>
<h2>Log:</h2>
<div class='log' id='log'>
</div>
</div>
</body>
<div class='log' id='log'>
I need to display a history of questions / answers, and here's how I imagine it:<script>
function doStuff() {
inputElement = document.getElementById('user');
answerElement = document.getElementById('answer');
logElement = document.getElementById('log');
}
</script>
Answer the question
In order to leave comments, you need to log in
An example of the simplest output to a block
jsfiddle.net/ksvzcbnq
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question