this is my code:
function riep() {
imuno = sessionStorage.getItem('imuno');
imdue = sessionStorage.getItem('imdue');
document.getElementById("myDiv").innerHTML = imuno + ", " + imdue;
}
It displays the src contained in the two variables (imuno,imdue) instead of the images, how can i solve that?
<img>tags for images<img >tag and set it's srcdocument.getElementById("myDiv").innerHTMLis used to show the content in the element. Also, from the names, it looks like you're using<div>element. Use<img>and set thesrcattribute value.document.getElementById('imgId').src = 'Happy';