JSFiddle - React, Tailwind, and code Playground

by acdcjunior

HTML

<form>
	<input type='text' id='input' />
	<input type='button' onclick='addText()' value='Add' class="buttonClass"/>
	</form>
	<ul id="do"> </ul>

JavaScript

var doc = document;

function addText() {    
	var input = doc.getElementById('input').value;
	doc.getElementById('do').innerHTML + " " ;
    doc.getElementById('do').innerHTML += "<li>" + input + " <span onclick='this.parentNode.parentNode.removeChild(this.parentNode)' style='cursor: pointer' > x </span>" + "</li>";

  }