I wanted to ask why innerHTML is not working in the following code:
document.getElementById('text').innerHTML = localStorage["mytext"];
The element with the id text is a div element. localStorage is giving me the right String if I use it with alert, what could the error be?