<script type="text/javascript">
function clock() {
now = new Date();
year = now.getFullYear();
month = now.getMonth() + 1;
day = now.getDate();
today = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
week = today[now.getDay()];
hour = now.getHours();
min = now.getMinutes();
sec = now.getSeconds();
if (hour < 10) {
hour = "0" + hour;
}
if (min < 10) {
min = "0" + min;
}
if (sec < 10) {
sec = "0" + sec;
}
$("#curTime").html(
year + "年" + month + "月" + day + "日" + " " + week + " " + hour + ":" + min + ":" + sec
);
}
setInterval(clock, 1000);
</script>
javascript 时钟
javascript相关文章
最近热门
- 英伟达H20与L20的参数对比
- hive | 侧视图 lateral view
- canvas绘制曲线
- CLS, COMPOSITE SLICE TRANSFORMER: AN EFFICIENT TRANSFORMER WITH COMPOSITION OF MULTI-SCALE MULTI-RANGE ATTENTIONS
- TensorFlow tf.searchsorted函数
- Doccano开源的数据标注工具
- Torch Dataloader
- COCO(Common Objects in Context)数据集
- Latent Dirichlet Allocation(潜在狄利克雷分配,简称LDA)
- Eigen - 开源的C++线性代数库
最常浏览
- 016 推荐系统 | 排序学习(LTR - Learning To Rank)
- 偏微分符号
- i.i.d(又称IID)
- 利普希茨连续条件(Lipschitz continuity)
- (error) MOVED 原因和解决方案
- TextCNN详解
- 找不到com.google.protobuf.GeneratedMessageV3的类文件
- Deployment failed: repository element was not specified in the POM inside distributionManagement
- cannot access com.google.protobuf.GeneratedMessageV3 解决方案
- CLUSTERDOWN Hash slot not served 问题原因和解决办法
×