Hi,

I have the following code which only works when I use a <p> tag rather than <div> tag.

Is there a reason why a <div> doesn't work?

Thanks

PHP Code:
<script>
function 
displayDate()
{
document.getElementByID("test") .innerHTML=Date();
}
</script>

<button type="button" onclick="displayDate()">test</button>
<p id="test">
show date
</p>