zoukankan      html  css  js  c++  java
  • 提醒功能

    提醒功能

    <div id="header">
    
        <script type="text/javascript">
            now = new Date(), 
            hour = now.getHours() 
            if(hour < 6){document.write("尊敬的用户:您来的可真早!")} 
            else if (hour < 8){document.write("尊敬的用户:新的一天开始啦!")} 
            else if (hour < 12){document.write("尊敬的用户:上午好!")}
            else if (hour < 14){document.write("尊敬的用户:中午好!")}
            else if (hour < 18){document.write("尊敬的用户:下午好!")} 
            else if (hour < 22){document.write("尊敬的用户:晚上好!")} 
            else if (hour < 24){document.write("尊敬的用户:夜深了,早点休息吧!")}
        </script>
    
        【今天是
    
        <script type="text/javascript">
            today=new Date();
            function initArray(){
            this.length=initArray.arguments.length
            for(var i=0;i<this.length;i++)
            this[i+1]=initArray.arguments[i]  }
            var d=new initArray(
            "星期日",
            "星期一",
            "星期二",
            "星期三",
            "星期四",
            "星期五",
            "星期六");
            document.write(
            "<font style='font-size:9pt;font-family: 宋体'> ",
            today.getFullYear(),"-",
            today.getMonth()+1,"-",
            today.getDate(),"",
            "    ",
            d[today.getDay()+1],
            "</font>" ); 
        </script></div>

  • 相关阅读:
    NOIP模拟测试7
    BigInt类
    bzoj 2733 [HNOI2012]永无乡 并查集+平衡树
    bzoj 2752 [HAOI2012]高速公路(road) 线段树
    bzoj 1584 Cleaning Up 打扫卫生 dp
    201709 半集训
    [SHOI2014]概率充电器 dp
    NOIP2016 天天爱跑步
    [HNOI2011] 数学作业
    [Poi2012]Festival
  • 原文地址:https://www.cnblogs.com/52net/p/3044664.html
Copyright © 2011-2022 走看看