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>
运行代码
查看全文
相关阅读:
hdu4578线段树维护平方和,立方和(加,乘,赋值)或者珂朵莉树
珂朵莉树(ODT老司机树)
Codeforces Round #524 (Div. 2)D
HDU1402 FFT高精度乘法模板题
中国剩余定理poj1006
POJ
Install and Config MySQL 8 on Ubuntu
Protobuf Examples
Learning Thrift
Flask Quickstart
原文地址:https://www.cnblogs.com/jikey/p/1772206.html
最新文章
Python 1 初识python
Pycharm 的基本操作
Python多继承查找规则:C3算法
Oracle千万级数据入库
Python解决超长文件路径的文件的复制、删除
Python解析超大的json数据(GB级别)
PyQt5中sys.argv和sys.exit(app.exec_())
QMainWindow和QWidget
Pycharm+PyQt5安装配置
re模块
热门文章
xml模块
json、pickle模块
十一周
作业
WEB(JSP)下的JDBC操作
application下的JDBC操作
lua 面向对象
python发送网易邮件
python爬取B站弹幕学习笔记
poj2104求区间第k小,静态主席树入门模板
Copyright © 2011-2022 走看看