我如何重写这个以便我可以使用容器div中的存储值?
<input id="email" type="text">
<div id="storage"></div>
<div class="container">This is some text. I want the value to show up in between the p tags here:<p></p>!</div>
JS:
(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);
}());