JSFiddle - React, Tailwind, and code Playground

by tmyie

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> x </span>" + "</li>";

  }