var str  = realFormatSecond(e.target.currentTime);
 
console.log(e.target.scrollTop); //1255256252
console.log( str ); // 05:31
 
function realFormatSecond(second) {
      var secondType = typeof second;
      if (secondType === "number" || secondType === "string") {
        second = parseInt(second);
        var mimute = Math.floor(second / 60);
        second = second - mimute * 60;
        return ("0" + mimute).slice(-2) + ":" + ("0" + second).slice(-2);
      } else {
        return "00:00";
      }
    }
 

相关文章:

  • 2022-12-23
  • 2021-09-08
  • 2021-12-13
  • 2022-12-23
  • 2021-08-26
  • 2021-04-19
  • 2021-07-17
  • 2021-10-08
猜你喜欢
  • 2022-01-03
  • 2021-12-25
  • 2022-12-23
  • 2021-12-12
  • 2022-12-23
  • 2021-11-03
  • 2021-08-04
相关资源
相似解决方案