Trying to make a simple to do list.
I'm wanting to know how to append the results from the resultsStored variable into the empty items div so it appends each time you enter an item into the text input.
Cheers!
HTML :
<input id="result" type="text" name="" placeholder="Enter item">
<button id="add-item" type="button" name="button">Add</button>
<div id="items">
</div>
JS :
var button = document.getElementById('add-item');
var result = document.getElementById('result');
document.querySelector('button').addEventListener("click", function() {
// Store results
var resultStored = result.value;
// Reset value of input
result.value = "";
// Get items container
var items = document.getElementById('items');
// Add items to container
});