1
0

More than 3 years have passed since last update.

JavaScriptで時計表示

Last updated at Posted at 2021-08-15

リアルタイムで動く時計表示

<!DOCTYPE html>
<html>
<head>
<title>サンプル</title>
<script>
window.onload = function() {
  setInterval(function() {
    var dd = new Date();
    document.getElementById("T1").innerHTML = dd.toLocaleString();
  }, 1000);
}
</script>
</head>
<body>
<div id="T1"></div>
</body>
</html>
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0