Jump to content

javascript greeting


jnf555

Recommended Posts

<html><body><script type="text/javascript">var d = new Date();var time = d.getHours();if (time < 12) { document.write("<b>Good morning<br>welcome to our website</b>"); }if (time ) // i would like to add a time here to be within morning and evening. 12 18, but i an not sure how to add two tines anyone help please// { document.write("<b>Good afternoon<br>welcome to our website</b>"); }if (time >= 18) { document.write("<b>Good evening<br>welcome to our website</b>"); }</script></body></html> thanks jnf555

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...