menu 喵雨の小屋
search assignment self_improvement
js网站问候语代码
MeowRain
MeowRain 2021年12月31日 阅读:146

        <span class="saying">
          <script language="javaScript" >
            now = new Date(),hour = now.getHours()
            if (hour<6){document.write(" 早上好!同学!")}
            else if (hour<9){document.write("早上好,同学们!")}
            else if (hour<12){document.write("上午好,同学们!")}
            else if (hour<14){document.write("中午好,同学们!")}
            else if (hour<17){document.write("下午好!同学们!")}
            else if (hour<19){document.write("傍晚好!同学们!")}
            else if (hour<22){document.write("晚上好!同学们!")}
            else {document.write("夜深了,学习注意眼睛哦!")}
            </script>
            </span>
分类:
标签: Javascript
目录