I am unable to get the result of this simple writing in javascript; thatīs it, doesnīt turn up a box containing "Good Morning".

<html>
<body>
<script type= "text/javascript">
var d = new Date ()
var time= d.getHours ()
if (time > 18)
{
document.write ("<b>Good Morning</b>")
}
</script>
</body>
</html>