Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
s0u7a committed Nov 5, 2023
1 parent c8ba9b4 commit 986f375
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,20 @@ import Layout from '../layouts/Layout.astro'
<Layout title="s0u7a.net">
<h1>s0u7a.net</h1>
<p>これはs0u7aのサイトです</p>
<p>現在時刻は <span id="text"></span>です</p>

<script type="text/javascript">
document.getElementById("text").innerHTML = showTime();

function showTime() {
var now = new Date();
var nowhour = now.getHours();
var nowminutes = now.getMinutes();
var nowseconds = now.getSeconds();

var text = nowhour + ":" + nowminutes + ":" + nowseconds;

return text;
}
</script>
</Layout>

0 comments on commit 986f375

Please sign in to comment.