js获取时分秒
来源:互联网 发布:绿盾防泄密软件 编辑:程序博客网 时间:2024/05/01 18:14
$(
"#aa"
).click(
function
() {
var
date =
new
Date();
this
.year = date.getFullYear();
this
.month = date.getMonth() + 1;
this
.date = date.getDate();
this
.day =
new
Array(
"星期日"
,
"星期一"
,
"星期二"
,
"星期三"
,
"星期四"
,
"星期五"
,
"星期六"
)[date.getDay()];
this
.hour = date.getHours() < 10 ?
"0"
+ date.getHours() : date.getHours();
this
.minute = date.getMinutes() < 10 ?
"0"
+ date.getMinutes() : date.getMinutes();
this
.second = date.getSeconds() < 10 ?
"0"
+ date.getSeconds() : date.getSeconds();
var
currentTime =
"现在是:"
+
this
.year +
"年"
+
this
.month +
"月"
+
this
.date +
"日 "
+
this
.hour +
":"
+
this
.minute +
":"
+
this
.second +
" "
+
this
.day;
alert(currentTime);
});
- js获取时分秒
- js 获取当前年月日时分秒星期
- js获取时间(年月日时分秒)
- js 获取当前年月日时分秒星期
- JS获取当前时间年月日时分秒
- js 获取当前年月日时分秒星期
- js年月日时分秒的获取
- java获取时分秒
- 获取年月日时分秒
- datetimepicker 获取时分秒
- 获取年月日时分秒
- JS倒计时(时分秒)
- js 倒计时 时分秒
- JS时分秒选择器
- js时分秒倒计时
- js时分秒控件
- js时分秒倒计时
- 秒转时分秒 js
- 6、王爽《汇编语言》笔记_实验8
- QT 界面和控件按某种关系比例增长
- poj 2031
- Oracle备份与恢复案例
- linux 批量 含空格文件名 重命名
- js获取时分秒
- Bayer图像处理(转)
- eclipse启动时无法创建java虚拟机
- 拥有线程安全和阻塞功能的vector类SemVector(LINUX平台)
- Log4j 日志级别
- 从rails升级到gem uninstall,gem cleanup与安装指定版本rails
- android ndk 编译 protobuf-2.5.0
- Android触摸事件传递
- [嵌入式]移植到纯净版本的uboot1.1.6过程--OK6410