JSFiddle - React, Tailwind, and code Playground
HTML
<div id='demo'>
Name:<input id='name' type='text' value='' onblur="hello()"/>
Output:
</div>
JavaScript
function hello(){
alert('hello');
var x=document.getElementById('name').value;
}
<div id='demo'>
Name:<input id='name' type='text' value='' onblur="hello()"/>
Output:
</div>
function hello(){
alert('hello');
var x=document.getElementById('name').value;
}