jQuery获取当前时间
来源:互联网 发布:美国经济数据gdp 编辑:程序博客网 时间:2024/05/01 12:54
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>获取当前时间</title></head><body> <p></p></body><script src="libs/jquery-1.11.3.js"></script><script>setInterval(function () { getCurrenttime();},1000);function getCurrenttime() { var date = new Date(); var seperator1 = "-"; var seperator2 = ":"; var month = date.getMonth() + 1; var day = date.getDate(); var hours = date.getHours(); var minutes = date.getMinutes(); var seconds = date.getSeconds(); if (month >= 1 && month <= 9) { month = "0" + month; } if (hours >= 1 && hours <= 9) { hours = "0" + hours; } if (minutes >= 1 && minutes <= 9) { minutes = "0" + minutes; } if (seconds >= 1 && seconds <= 9) { seconds = "0" + seconds; } if (day >= 0 && day <= 9) { day = "0" + day; } var currentdate = date.getFullYear() + seperator1 + month + seperator1 + day + " " + hours + seperator2 + minutes + seperator2 + seconds; return $('p').html(currentdate);}</script></html>
1 0
- jquery获取当前时间
- jquery获取当前时间
- jquery 获取当前时间
- jquery获取当前时间
- jquery获取当前时间
- jquery获取当前时间
- jQuery获取当前时间
- jquery 获取当前时间
- jquery获取当前时间
- jquery获取当前时间
- 用jquery获取当前时间
- jQuery获取格式化当前时间
- jquery 获取当前时间所在的星期
- jquery获取当前日期和时间
- jquery获取当前系统时间--已解决
- Js获取当前日期时间及其它操作(jquery?)
- Js获取当前日期时间及其它操作(jquery?)
- jquery显示当前时间
- Ajax技术1——XMLHttpRequest对象
- 选票统计
- 计算一天的毫秒与微秒相除
- leetcode/algorithm 3. Longest Substring Without Repeating Characters
- R语言主成分分析
- jQuery获取当前时间
- iOS中的Copy
- 静态代码块+构造代码块+构造方法
- java注解和反射制作dao基类的练习
- 删除线性表中的重复元素
- Wireshark学习笔记——如何快速抓取HTTP数据包
- Servlet中Cookie的用法
- C++Primer第五版 第十章习题答案(41~42)
- 网络连接评分机制之NetworkAgent