V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐关注
Meteor
JSLint - a JavaScript code quality tool
jsFiddle
D3.js
WebStorm
推荐书目
JavaScript 权威指南第 5 版
Closure: The Definitive Guide
aglsv

关于 currenttime 的问题

  •  
  •   aglsv · Sep 7, 2020 · 2052 views
    This topic created in 2058 days ago, the information mentioned may be changed or developed.

    我直接写了个 var t = audio.currenttime 时。t 的值一直是零,写在 ontimeupdate 函数里的时候就能正常返回值 不过 console 里会提示 GET http://127.0.0.1:5502/favicon.ico 404 (Not Found)但是不影响 想问问原因

    1 replies    2020-09-08 15:51:03 +08:00
    xiaoming1992
        1
    xiaoming1992  
       Sep 8, 2020   ❤️ 1
    var t = audio.currenttime
    t 始终是该行代码被调用时的 currenttime,所以一直是零,ontimeupdate 会不断调用,所以是正常返回值
    至于 favicon.ico 404 (Not Found),不影响,只是浏览器在请求你的 favicon,没找到自然就报 404 了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1368 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 23:50 · PVG 07:50 · LAX 16:50 · JFK 19:50
    ♥ Do have faith in what you're doing.