Hi all i have posted a few questions regarding java script i have this script
<script>
//Time of day message script- by javascriptkit.com
//Visit JavaScript Kit (
http://javascriptkit.com) for script
//Credit must stay intact for use
var Digital=new Date()
var hours=Digital.getHours()
//Configure message below to your own.
if (hours>=5&&hours<=11) //MESSAGE FOR MORNING
document.write('<b>Welcome to our site. Good morning visitor.</b>')
else if (hours==12) //MESSAGE FOR NOON
document.write('<b>It is high noon. Thanks for dropping by!</b>')
else if (hours>=13&&hours<=17) //MESSAGE FOR AFTERNOON
document.write('<b>Good afternoon, and thanks for visiting.</b>')
else if (hours>=17&&hours<=19) //MESSAGE FOR EVENING (6pm-8pm)
document.write('<b>Good evening. Hope you\'re enjoying the gentle breeze</b>')
else if (hours>=18&&hours<=11) //MESSAGE FOR NIGHT (9pm-11pm)
document.write('<b>Glad to see you this time of the night.</b>')
else //MESSAGE FOR LATE NIGHT, EARLY MORNING (12pm-4am)
document.write('<b>Wow, thanks for choosing to visit our site over sleep!</b>')
</script>
on These line's
else //MESSAGE FOR LATE NIGHT, EARLY MORNING (12pm-4am)
document.write('<b>Wow, thanks for choosing to visit our site over sleep!</b>')
i wish to change it from displaying the message
Wow, thanks for choosing to visit our site over sleep!</
into an image so lets say my image is named will.jpg how would it look
Im guess is something like this
else if (hours>=15&&hours<=16) //MESSAGE FOR NIGHT (15pm-16pm)
} else if (timeNow < 18) {img = 'will.jpg';
PLease help
__________________
All the Gear & no idea