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>

  • 相关阅读:
    day25:接口类和抽象类
    vue1
    How the weather influences your mood?
    机器学习实验方法与原理
    How human activities damage the environment
    Slow food
    Brief Introduction to Esports
    Massive open online course (MOOC)
    Online learning in higher education
    Tensorflow Dataset API
  • 原文地址:https://www.cnblogs.com/52net/p/3044664.html
Copyright © 2011-2022 走看看