<!DOCTYPE html>
<html>
<body>

<p>Click the button to display seconds and milliseconds after changing both of them.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<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>