当前位置:网站首页>JS countdown case
JS countdown case
2022-07-02 06:52:00 【Overnight ξ】
// Countdown cases
function conutDown(time) {
var nowTime = +new Date() // Returns the total number of milliseconds of the current time
var inputTime = +new Date(time) // Returns the total number of milliseconds of user input time
var Times = (inputTime - nowTime) / 1000 // Total milliseconds remaining
var d = parseInt(Times / 60 / 60 / 24)
d = d < 10 ? '0' + d : d
var h = parseInt(Times / 60 / 60 % 24)
var m = parseInt(Times / 60 % 60)
var s = parseInt(Times % 60)
return d + ' God ' + h + ' when ' + m + ' branch ' + s + ' second '
}
console.log(conutDown('2022-2-14 15:00:00'))边栏推荐
- 20201002 vs 2019 qt5.14 developed program packaging
- Render minecraft scenes into real scenes using NVIDIA GPU
- Selenium memo: selenium\webdriver\remote\remote_ connection. Py:374: resourcewarning: unclosed < XXXX > solution
- 2020-9-23 use of QT timer qtimer class.
- Build learning tensorflow
- 默认google浏览器打不开链接(点击超链接没有反应)
- The use of regular expressions in JS
- Linux MySQL 5.6.51 Community Generic 安装教程
- qq邮箱接收不到jenkins构建后使用email extension 发送的邮件(timestamp 或 auth.......)
- js创建一个自定义json数组
猜你喜欢

flex九宫格布局

qq邮箱接收不到jenkins构建后使用email extension 发送的邮件(timestamp 或 auth.......)

The use of regular expressions in JS

Cve-2015-1635 (ms15-034) Remote Code Execution Vulnerability recurrence

CTF three count

Latex compiles Chinese in vscode and solves the problem of using Chinese path

There is no way to drag the win10 desktop icon (you can select it, open it, delete it, create it, etc., but you can't drag it)

SQL注入闭合判断

Solution to the black screen of win computer screenshot

Build learning tensorflow
随机推荐
selenium的web自动化中常用的js-修改元素属性翻页
DeprecationWarning: . ix is deprecated. Please use. loc for label based indexing or. iloc for positi
Présence d'une panne de courant anormale; Problème de gestion de la fsck d'exécution résolu
Implement strstr() II
How to try catch statements that return promise objects in JS
[literature reading and thought notes 13] unprocessing images for learned raw denoising
QQ email cannot receive the email sent by Jenkins using email extension after construction (timestamp or auth...)
Fe - wechat applet - Bluetooth ble development research and use
Latex在VSCODE中编译中文,使用中文路径问题解决
Sentry搭建和使用
Fe - use of weex development weex UI components and configuration use
UEditor .Net版本任意文件上传漏洞复现
The use of regular expressions in JS
JS delete the last character of the string
Explanation and application of annotation and reflection
Date time API details
20201002 VS 2019 QT5.14 开发的程序打包
Flask migrate cannot detect db String() equal length change
Self cultivation of programmers - Reflection on job hunting
virtualenv和pipenv安装