<html>
<body>
<p id="demo">Click the button to display seconds and milliseconds after changing both of them.</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction()
{
var d = new Date();
d.setSeconds(35,825);
var s = d.getSeconds();
var ms = d.getMilliseconds();
var x = document.getElementById("demo");
x.innerHTML=s + ":" + ms;
}
</script>
</body>
</html>