I want to insert an image into a div tag with the ID "window":
<div id="window">
<h3 id="score">Score: 0</h3>
<h3 id="end">End Game</h3>
<video autoplay muted loop id="myVideo">
<source src="images/background.mp4" type="video/mp4">
</video>
</div>
What my function looks like atm:
function spawn1() {
document.getElementById("window").innerHTML = "<img src='images/redtarget.png' style='width:10%'>";
}
How can I insert an HTML element without using .innerHTML since it replaces everything within my div tag?