JSFiddle - React, Tailwind, and code Playground

HTML

<div id="bar"></div>

JavaScript

function foo(m){
    alert(m)
}

var elem7 = document.createElement("input");
elem7.type="text";
		elem7.value=50;
		txt="elite1";
		elem7.id=txt;
elem7.onblur=function(){foo(this.id)}; 
document.getElementById('bar').appendChild(elem7);