写个函数让函数不判断地进行周期性时间判断不就可以了?

解决方案 »

  1.   

    <SCRIPT>
    now=new Date();
    hour=new Date().getHours();
    min =new Date().getMinutes()
    if (now.getDate() >= 26  && hour >14)aa
    else if(now.getDate() == 26 && hour >= 14){alert("   ★★★公告★★★\n\nXX佳宾于正在嘉宾作客\n\n赶紧去参加!!\n\n★★★★★★★★")}
    else if(now.getDate() <= 26 && hour <14) {alert("2   ★★★公告★★★\n\nXX佳宾于 2007年1月26日 \n\n下午2点作客于e网情深\n\n请届时参加!!\n\n★★★★★★★★★★★★★★★")}
    onError = null;
    </SCRIPT>