質問編集履歴
2
全部直したと思ってます
title
CHANGED
File without changes
|
body
CHANGED
@@ -25,6 +25,7 @@
|
|
25
25
|
<input id="pass">
|
26
26
|
<button><div class="toukoub">投稿</div></button>
|
27
27
|
<p class="announce-text" id="announce"></p>
|
28
|
+
<p class="osuna">aaaa</p>
|
28
29
|
<small class="copyright">©ゆーりん 2021 煽れよちゅぎちゅん作成委員会 inc.</small>
|
29
30
|
<script src=" index.js"></script>
|
30
31
|
</body>
|
@@ -32,12 +33,13 @@
|
|
32
33
|
```
|
33
34
|
```javascript
|
34
35
|
window.addEventListener('load', function() {
|
35
|
-
const osuna = document.
|
36
|
+
const osuna = document.querySelector('.toukoub');
|
36
37
|
osuna.addEventListener('click', function() {
|
37
|
-
|
38
|
+
alert('done');
|
38
39
|
})
|
39
40
|
})
|
40
41
|
```
|
42
|
+
直したあとのものです
|
41
43
|
|
42
44
|
### 試したこと
|
43
45
|
|
1
エラーを追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -5,8 +5,7 @@
|
|
5
5
|
|
6
6
|
### 発生している問題・エラーメッセージ
|
7
7
|
|
8
|
-
エラー
|
8
|
+
addEventListenerがfunctionではないというエラーが出ていました。
|
9
|
-
|
10
9
|
### 該当のソースコード
|
11
10
|
|
12
11
|
```html
|