首页 > 教程 > 前端技术 > 模板制作

    收藏

    destoon js判断时间问候语
    DT模板2016-09-15模板制作59℃
    广告
    核心提示:script language=javascriptnow = new Date();hour = now.getHours();if(hour6){document.write(凌晨好!)}else if (hour9){document.write(早上好!)}else if (hour12){document.write(上午好!)}else if (hour14){document.write(中午好!)}else if (hour17){document.write(下午好!)}else if
    <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 < 23){document.write("晚上好!")}
    else {document.write("夜里好!")}
    </script>
 
  • 文本链接:https://mbtxw.com/Course/show.php?itemid=44
  • 文章来源:模板模板
  • 版权声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。
0相关评论