Knowledge Walls
Laya
Hyderabad, Andhra Pradesh, India
Date.prototype.setMilliseconds() Method in Date Class of Javascript Syntax with Examples
1091 Views
Usage 
The setMilliseconds() Method is used to set the milliseconds for mentioned date based on local time.
Syntax 
dateObj.setMilliseconds(millisecondsValue)
Example
var today = new Date();
document.write("Today: "+today.getMilliseconds());
document.write("<br />");

today.setMilliseconds(today.getMilliseconds() - 1);
document.write("1 MilliSec Before: "+today.getMilliseconds());
Output 
Today: 901
1 MilliSec Before: 900
Best Lessons of "Javascript Syntax with Examples"
Top lessons which are viewed more times.
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details