how to display image in div using id in html

51

how to display image in div using id in html -

document.getElementById('imageDiv')
    .innerHTML = '<img src="imageName.png" />';

Comments

Submit
0 Comments