zoukankan
html css js c++ java
时间函数
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>豪情</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"> </script> </head> <body> 糖果的时间: <div id="a"> </div> <script type="text/javascript"> $(function(){ }); var Dateformat = function(date, f){ var o = { "M+": date.getMonth() + 1, "d+": date.getDate(), "h+": date.getHours(), "m+": date.getMinutes(), "s+": date.getSeconds(), "q+": Math.floor((date.getMonth() + 3) / 3), "S": date.getMilliseconds() }; if (/(y+)/.test(f)) f = f.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length)); for (var k in o) if (new RegExp("(" + k + ")").test(f)) f = f.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length)); return f; } t(); function t(){ document.getElementById('a').innerHTML = Dateformat(new Date(), 'yyyy年MM月dd日 hh点mm分ss秒'); setTimeout(t, 1000); } //setInterval(t, 1000); </script> </body> </html>
运行代码
查看全文
相关阅读:
hadoop集群委任和解除节点
hadoop参数
HDFS启动及读写过程(读书笔记)
hadoop QJM高可用原理
十七、S3C2440裸机—IIC 接口
十六、S3C2440裸机—UART
十五、S3C2440裸机—系统时钟和定时器
十四、s3c2440裸机—中断控制器
四、NAND Flash
二、存储管理器--SDRAM
原文地址:https://www.cnblogs.com/jikey/p/1772206.html
最新文章
chrome浏览器video自动播放失效的解决方案
一个好看的文字效果
画线动画——SVG版和纯CSS版
object标签和embed标签
SVG学习笔记
swiper里面几个有用的参数
[转]Python安装3 —— Python3.8和2.7共存
emmm......就当练习了系列05
python基础08——集合&字符编码&笔记
emmm......就当练习了系列04
热门文章
python基础07——列表类型&元组类型&字典类型
emmm......就当练习了系列03
python基础06——for循环&字符串类型&数字类型
python基础05——深浅copy&while循环
emmm......就当练习了系列02
curl 命令
iperf网络新能评估
tcpdump
git安装和基本使用
git 读书笔记
Copyright © 2011-2022 走看看