不多说,直入主题:

JS。

// JavaScript Document
function showtime()
{
var today,hour,second,minute,year,month,date;
var strDate ;
today=new Date();
var monthname=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
var n_day = today.getDay();
switch (n_day)
{
case 0:{
strDate = "星期天"
}break;
case 1:{
strDate = "星期一"
}break;
case 2:{
strDate ="星期二"
}break;
case 3:{
strDate = "星期三"
}break;
case 4:{
strDate = "星期四"
}break;
case 5:{
strDate = "星期五"
}break;
case 6:{
strDate = "星期六"
}break;
case 7:{
strDate = ""
}break;
}
hour = today.getHours();
minute =today.getMinutes();
second = today.getSeconds();
document.getElementById('time').innerHTML = monthname[today.getMonth()] + " " + today.getDate() + ", " + today.getFullYear() +" "+strDate+" " + hour + ":" + minute + ":" + second;
setTimeout("showtime();", 1000); // 1000 ms(1 s)
}
<span id="time"></span><script language="javascript"> showtime();</script>

搞定

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAARsAAAAaCAIAAAAIZG9nAAAJiElEQVR4nO2ZW1MbRxbHR5I/C6oaPfaXQFUrUeuHtbSPSKRiXZEtxCKN8BaWuOkCwQrLZf0QOzYYyLMN2I5xJG7207I2Dkke9pKEABE3SUDiJPswt56enp6RxGV3ma5/UT3dZ860Zs6vz5mBWv1lRK5XZ6nV97p0jay+P+Mwq16vfq1Lr38bff3bKFUzPxf+PHRdWp0DYzVzRZ0DOSs//0WXLlWdJ2lnhxZVMzwX/gB0XVqdLmanixZ1uuQs/zSsS9cp6nRJq5+uqok6C2aWTnTpUtdZ8FYzXTVzRdUDT123T9cl1pmCVwNgp8gVpQWh88Fj6ViLknYQyWqy1IXRw0GvEbgxutEJm/Xf8Ppec/bWz4aXPrshWJoHe3CeO61SD7DOB8KqADtFtFCiFBBK2oHb4IxPcctN2kEkezpIqGvx6GNlJe2gLUMyOBWlgw5/8B1hDW77fC2eMzEhiGX+38VppSnikiCfSueKejDgtc7Ixl+1m0OdsI2UN69vIGQe6Fk8+nhxhu9gPId8ryQjKg/6aYT3r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xjZLq0oEXgSgtUlBwkOUVYflSBIT0DXZdeVSFKIE0OmJwuJbTq5AoLFYWARKAIC48qKs93FPVse0DXJRQhJFTBw2KmSpcSWkjKQriqNllxRGFBQijC8qOEjfwOPt3KEjT/g67LInIkkNlTwgwBDKGLjFY9XClVgJQcJCQXyRGSw6MKyVNlzW/quiwihYEafnLM5IBhcxcBLVWukCJQSwVIISBhKUIQwpJDhmTu+wxWs9+ldV0qKUUCGT8saVjAsHTJ0SJzhbxfYZOVElSUHCQCRXJ+sMwgN/HJtxjN6rrEwoeEMntyzBDACHRh0dLOVbVQUcVi8Ueo7ezs7OzsbG9vb29vb21tbW1t/SBtm5ubm5ub3/PtO759q9D+LWv/0tD+qbf/8ablKctjQymKhDATAo+NQyQ42Yhlo5eNZDi2i8Xi7u7u7u7u3t7e3t7ePt8ODg4ODg4ODw8PDw9LpVKpVCpDrVKpVCqVo6Ojo6Oj4+Pj4+PjE6j9xLef+UZpAQmmCMuPEjDIXf6H3vQmawQUCbDBgMnpIqBVLBZZtMhc1QzVfwDxLM4oPUQAGwAAAABJRU5ErkJggg==" alt="" />

php随笔6-thinkphp OA系统 JS 实时显示当前时间的更多相关文章

  1. vue实时显示当前时间且转化为“yyyy-MM-dd hh:mm:ss”格式

    在实际运用中时间格式"yyyy-MM-dd hh:mm:ss"用的最多,如果需要其他格式可根据需求自行修改,下面直接上代码: 引入相应的js即可运行 <!DOCTYPE ht ...

  2. JavaScript实时显示当前时间的例子

    用javascript代码在当前页面中实时显示当前时间.代码如下: <html> <head> <title>JavaScript 实时显示当前时间-www.jbx ...

  3. Vue页面上实时显示当前时间,每秒更新

    有时候我们需要在页面上添加一个类似时钟的东西来实时显示当前时间,这个时候我们可以利用定时器来完成这个功能 <div id="app"> {{date}} </di ...

  4. php随笔7-thinkphp OA系统 JS 文本框输入实时控制字数

    JS: //多行文本输入框剩余字数计算 function checkMaxInput(obj, maxLen) { if (obj == null || obj == undefined || obj ...

  5. js实时显示系统时间

    刚刚在做后台页面最上面要动态显示时间刚写了这个代码 将这段代码加入<head></head> <!--时间显示代码 --><script>functio ...

  6. js 实时显示字数

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  7. Cesium随笔(3)随鼠标实时显示经纬度坐标以及高度【转】

    在网页三维地球上进行可视化开发与经纬度坐标以及高度是分不开的,能够实时获取鼠标位置的经纬度对可视化效果有很好的帮助,Cesium当然能做到: (1)首先在里创建显示坐标的容器  样式自己调整的合适即可 ...

  8. js实时显示鼠标坐标

    <!DOCTYPE html><html><head>    <meta charset="utf-8">    <title ...

  9. Javascript 客户端实时显示服务器时间

    <!doctype html> <html lang="zh-cn"> <head> <meta charset="utf-8& ...

随机推荐

  1. Android学习路径图

    一个PHPer转战Android学习过程: 直接跨过java的学习,原因有我之前看过毕向东和张孝祥的Java基础课程,虽然中间好几次看睡着,但java的环境是能跑起来的.我建议大家如果没有Java基础 ...

  2. highlight a DOM element on mouse over, like inspect does

    highlight a DOM element on mouse over, like inspect does highlight a DOM element on mouse over, like ...

  3. ios中的银联支付

    场景 随着移动互联网的迅猛发展,移动互联已经深深地融入我们的生活.其中,支付方式也是我们生活中经常遇到的情况.所以,在我们的应用中加入支付功能是多么的重要.现在主流的支付接口,一是支付宝类的,一是银联 ...

  4. [置顶] 【cocos2d-x入门实战】微信飞机大战之二:别急,先处理好CCScene和CCLayer的关系

    转载请表明地址:http://blog.csdn.net/jackystudio/article/details/11713197 在整个游戏开始之前,我们先看一下HelloWorld示例中CCSce ...

  5. How draw a stem -and -leaf &amp; box-plot display by R.or Python

    参考: 使用R进行数据可视化套路之-茎叶图.盒形图 step by step R 读取数据 在网上下载的2013全国各省区GDP排名(exl文件) 先 另存为 data.txt(为了方便存到D盘文件夹 ...

  6. Windows 10 安装

    下载了 Windows 10 的 ISO 文件:WindowsTechnicalPreview-x64-ZH-CN.iso,在 VMWare 10 上进行了安装. 安装时没有 Windows 10   ...

  7. docker基础入门之一

    一.概述 1.传统虚拟化技术: 纯软件的虚拟化是通过对于硬件层的模拟从而实现允许运行多个操作系统: 硬件辅助虚拟化需要硬件层面对于虚拟化的支持,类似Intel-VT技术等,具有更高的运行效率: 解决方 ...

  8. Python主要模块和常用方法简览

    原文地址:http://blog.csdn.net/hwhjava/article/details/22284399 PY核心模块方法1. os模块: os.remove() #删除文件 os.unl ...

  9. multi-threaded copy command - robocopy

    we can copy files by the powerful robocopy tool, and it allow copy using muliti-threaded as well. As ...

  10. [转]swift 学习资源 大集合

    今天看到了一个swift的学习网站,里面收集了很多学习资源 [转自http://blog.csdn.net/sqc3375177/article/details/29206779] Swift 介绍 ...