JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" id="input" value="Hello World!"/>
<button id="click">Show</button>
JavaScript
var input = document.getElementById('input');
document.getElementById('click').addEventListener('click', function (event) {
window.alert(input.value); // Or in jQuery use .val()
});