How would I create a list of the user's inputs using createElement()?
Something so that when somebody adds text into the prompt("enter text") box, it displays on the screen. I've tried researching createElement(), but I'm still only able to display the latest input using a variable.
Edit:
<script>
function myFunction()
{
var user =prompt("Enter your name:")
var text =prompt("Hello " + user + ". Enter some text:")
count++;
document.getElementById("count").innerHTML=count;
document.getElementById("latest").innerHTML=text;
}
</script>
<p>Total: <span id="count">0</span></p>
<p>Latest blocked term: <span id="latest"></span></p>
<button onclick="myFunction()">Click</button>
I've cut off unrelated parts, so I hope this works.