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>
运行代码
查看全文
相关阅读:
面经中高频知识点归纳(四)
ssh整合思想初步 struts2与Spring的整合 struts2-spring-plugin-2.3.4.1.jar下载地址 自动加载Spring中的XML配置文件 Struts2下载地址
ssh整合思想初步 structs2 Spring Hibernate三大框架各自要点
Spring中使用事务搭建转账环境方法二 相对简便的注解方法 ——配置文件注入对象属性需要setter方法 注解方法,不需要生成setter方法
Spring中使用事务搭建转账环境 转账操作,
Spring中c3p0连接池的配置 及JdbcTemplate的使用 通过XML配置文件注入各种需要对象的操作 来完成数据库添加Add()方法
Spring XML配置文件无法自动提示 eclipse中XML配置文件open with打开方式选择 XML Editor:注意它的编辑方式也是有两种的design和source
Spring中c3p0连接池 jar包下载 c3p0-0.9.2.1 jar包和mchange-commons-java-0.2.3.4 jar 包
在线聊天项目1.4版 使用Gson方法解析Json字符串以便重构request和response的各种请求和响应 解决聊天不畅问题 Gson包下载地址
java在线聊天项目1.3版设计好友列表框功能补充,因只要用户登录就发送一串新列表,导致不同客户端好友列表不同问题
原文地址:https://www.cnblogs.com/jikey/p/1772206.html
最新文章
Mysql:logging 安全问题:server & client
ASP.NET Core中使用EasyCaching作为缓存抽象层
.Net Core Ocelot Consul 实现API网关 服务注册 服务发现 负载均衡
.Net Core Grpc Consul 实现服务注册 服务发现 负载均衡
.Net Core Grpc 实现通信
.Net Core 3.0使用Grpc进行远程过程调用
Java集合杂谈
案例银行转账存储过程
Sqlserver 索引
SqlServer中union 和 union all的区别
热门文章
SqlServer中#和##的区别
Centos6.5下VNC Server配置
环境配置
“一战通offer”互联网实习季编程挑战
好文章系列C/C++——图说C++对象模型:对象内存布局详解
百度2017暑期实习生编程题
Wireshark协议分析工具应用
腾讯2017暑期实习生编程题
视频笔记之——技术面之项目面试技巧大揭秘
小项目分析之C++ 实现模拟银行排队
Copyright © 2011-2022 走看看