How to format $.now() with Jquery

前端 未结 7 1887
醉话见心
醉话见心 2021-01-11 09:38

$.now() gives me the time as miliseconds. I need to show it something like hh:mm:ss

How can I do that in Jquery?

7条回答
  •  离开以前
    2021-01-11 10:37

    JSFiddle example here

    http://jsfiddle.net/NHhMv/

    The jquery now is nothing but

    The $.now() method is a shorthand for the number returned by the expression

    (new Date).getTime().
    

    from jquery

    http://api.jquery.com/jQuery.now/

    and follow this link

    Where can I find documentation on formatting a date in JavaScript?

提交回复
热议问题