-
.formatSeconds = function(value) { var theTime = parseInt(value); var theTime1 = 0; var theTime2 = 0; if (theTime > 60) { theTime1 = parseInt(theTime / 60); theTime = parseInt(theTime % 60); if (theTime1 > 60) { theTime2 = parseInt(theTime1 / 60); theTime1 = parseInt(theTime1 % 60) } } return { 'hour': theTime2 < 10 ? '0' + theTime2 : theTime2, 'min': theTime1 < 10 ? '0' + theTime1 : theTime1, 'sec': theTime < 10 ? '0' + theTime : theTime } };
js格式化成秒
716 人参与 | 时间:2021年02月28日 10:34:09
相关文章
- 2019-04-13 动态加载js文件
- 2019-04-17 F2 - AntV
- 2019-04-16 你所不知道的setTimeout | 晚晴幽草轩
- 2019-04-17 html2canvas - Screenshots with JavaScript
- 2019-04-15 howler.js声音js
- 2019-04-15 pixi-viewport API Documentation
- 2021-03-01 使用vue开发webApp,安卓手机自带回退键的问题解决 - 流浪_光头 - 博客园
- 2021-03-01 Layx: Layx 新一代Web弹窗组件。 - 码云 Gitee.com
- 2021-03-01 无后端评论系统
- 2021-03-01 clipboard.js — Copy to clipboard without Flash
评论专区加入QQ群交流