jnf555 Posted January 26, 2012 Share Posted January 26, 2012 <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 More sharing options...
justsomeguy Posted January 26, 2012 Share Posted January 26, 2012 if (time > 12 && time < 18) Link to comment Share on other sites More sharing options...
jnf555 Posted January 26, 2012 Author Share Posted January 26, 2012 thanks for your help jnf555 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.