JSFiddle - React, Tailwind, and code Playground

by Jay Scott. ANDERSON

HTML

<input id="email" type="text">
<div id="storage"></div>

JavaScript

(function () {
    var text = document.getElementById('email');
    text.addEventListener('keyup', function () {
        sessionStorage.text = text.value;
        document.getElementById('storage').innerHTML = 'Your stored value is ' + sessionStorage.text;
    }, false);
}());