You can do it using the property
innerHTML
which all elements have, for example.
myDiv = document.GetElementById("myDivId");
myDiv.innerHTML = month[day.getMonth()];
You need to mark the target
div
with matching id attribute:
<div id="myDivId"></id>
At first, you can put some content inside this
div
or leave it empty. If would be filled in by the fragment of JavaScript code shown above.
—SA