运行结果尺寸: 300 x 150
x
 
<!DOCTYPE html>
<html>
<body>
<p>更改后单击按钮显示秒数和毫秒数。</p>
<button onclick="myFunction()">试一试</button>
<p id="demo"></p>
<script>
function myFunction() {
  var d = new Date();
  d.setUTCSeconds(35, 825);
  var s = d.getUTCSeconds();
  var ms = d.getUTCMilliseconds();
  var x = document.getElementById("demo");
  x.innerHTML = s + ":" + ms;
}
</script>
</body>
</html>
×

报个问题: