質問編集履歴
2
HTML更新
title
CHANGED
File without changes
|
body
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
よろしくお願い致します。
|
7
7
|
```JavaScript
|
8
|
-
|
8
|
+
<!DOCTYPE html>
|
9
9
|
<html lang="ja">
|
10
10
|
<head>
|
11
11
|
<meta charset="utf-8">
|
@@ -21,9 +21,10 @@
|
|
21
21
|
</section>
|
22
22
|
|
23
23
|
<script>
|
24
|
+
window.onload = function(){
|
24
25
|
let today = new Date();
|
25
|
-
|
26
26
|
document.write("年="+ today.getFullYear());
|
27
|
+
}
|
27
28
|
</script>
|
28
29
|
</body>
|
29
30
|
</html>
|
1
HTMLの全体を記述致しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -5,6 +5,13 @@
|
|
5
5
|
|
6
6
|
よろしくお願い致します。
|
7
7
|
```JavaScript
|
8
|
+
<!DOCTYPE html>
|
9
|
+
<html lang="ja">
|
10
|
+
<head>
|
11
|
+
<meta charset="utf-8">
|
12
|
+
<title>title</title>
|
13
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
14
|
+
</head>
|
8
15
|
<body>
|
9
16
|
<header>
|
10
17
|
<h1>日付項目の取得</h1>
|
@@ -14,11 +21,10 @@
|
|
14
21
|
</section>
|
15
22
|
|
16
23
|
<script>
|
17
|
-
window.onload=function(){
|
18
24
|
let today = new Date();
|
19
25
|
|
20
|
-
document.write("年
|
26
|
+
document.write("年="+ today.getFullYear());
|
21
|
-
}
|
22
27
|
</script>
|
23
28
|
</body>
|
29
|
+
</html>
|
24
30
|
```
|