Skip to content

시간때에 따라 바뀌는 배경

MintState October 29, 2008 at 8:52 PM Views 12544

시간때에 따라 바뀌는 배경

<SCRIPT LANGUAGE="Javascript"> 
<!--- 
today = new Date(); 
var hour = today.getHours(); 
if (hour > 7 && hour < 19) 
{document.bgColor = "aqua" ;} 
else { document.bgColor= " maroon" ; } 
//--> 
</SCRIPT>

 

응용하면 배경뿐만 아니라 시간대별로 글이나 이미지.. 등도 다르게 나오게 할 수 있겠네요.

Share X Facebook LINE QR code

0 comments

Be the first to comment.