-
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格式化成秒
7652 人参与 | 时间:2025年07月23日 16:30:47
内容
站外导购
使用vue开发webApp,安卓手机自带回退键的问题解决 - 流浪_光头 - 博客园
2025-07-23
Layx: Layx 新一代Web弹窗组件。 - 码云 Gitee.com
2025-07-23
无后端评论系统
2025-07-23
clipboard.js — Copy to clipboard without Flash
2025-07-23
根据白名单过滤HTML(防止XSS攻击)
2025-07-23
JavaScript和WebAssembly中的语音识别
2025-07-23
Cassowary是一种算法,可以快速计算灵活,响应迅速的布局,而无需使用大量的命令式代码
2025-07-23
用于创建语音邮件的库
2025-07-23
在Javascript中将浏览器麦克风转换为mp3的漂亮库
2025-07-23
js 随机字符串
2025-07-23