인터넷정보

시간대별로 랜덤한 이미지, 텍스트 넣기

알 수 없는 사용자 2007. 10. 17. 14:00
<script language="JavaScript">
<!--
<!--
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
function clock(){
var today = new Date();
var today_sec = today.getSeconds();
//alert(today_sec);

if(today_sec<=2){

document.main_img.src='image URL1';
}

else if((today_sec<=4)){
document.main_img.src='image URL2';
}


else if((today_sec<=6)){
document.main_img.src='image URL3';
}

else if((today_sec<=8)){
document.main_img.src='image URL1';
}

else if((today_sec<=10)){
document.main_img.src='image URL2';
}

else if((today_sec<=12)){
document.main_img.src='image URL3';
}


else if((today_sec<=14)){
document.main_img.src='image URL1';
}

else if((today_sec<=16)){
document.main_img.src='image URL2';
}

else if((today_sec<=18)){
document.main_img.src='image URL3';
}

else{

document.main_img.src='image URL1';
}
}
-->//-->
</script>
반응형