JSFiddle - React, Tailwind, and code Playground

by jannis

HTML

<div id="somevalue">This div has an ID of "somevalue"</div>

<input value="Some Value" />
<br/>
<p>Click the input field</p>

JavaScript

$('input').click(function() {
    var value = $('input').val().replace(/ /gi, '').toLowerCase();
    $('p').html( "The output: " + value );
});