time - In JavaScript how to get second of current day? -


Then the question is described in the title. I need to get the current second of the day using javascript.

You add bits: var dt = new date (); Var seconds = dt.getSeconds () + (60 * dt.getMinutes ()) + (60 * 60 * dt.getHours ());

or if you prefer

  var dt = new date (); Var seconds = dt.getSeconds () + (60 * (dt.getMinutes (+ + 60 * dt.getHours ())));    

Comments

Popular posts from this blog

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -