JSFiddle - React, Tailwind, and code Playground
by acdcjunior
HTML
<input value="Write item here" id="input">
<button>Add</button>
<hr>
<ul>
<li id="list">Start a list</li>
</ul>
JavaScript
var button = document.getElementsByTagName('button')[0];
var doc = document;
button.onclick = function () {
var mySubmission = doc.getElementById('input').value;
var myLI = document.createElement('li');
myLI.appendChild(document.createTextNode(mySubmission));
document.getElementById('list').appendChild(myLI);
};