質問編集履歴
3
編集
test
CHANGED
File without changes
|
test
CHANGED
@@ -16,11 +16,11 @@
|
|
16
16
|
|
17
17
|
```
|
18
18
|
|
19
|
-
Uncaught
|
19
|
+
Uncaught TypeError: document.getElementById(...).charAt is not a function
|
20
20
|
|
21
|
-
at kaibun (練習2.html:
|
21
|
+
at kaibun (練習2.html:10)
|
22
22
|
|
23
|
-
at HTMLButtonElement.onclick (練習2.html:
|
23
|
+
at HTMLButtonElement.onclick (練習2.html:22)
|
24
24
|
|
25
25
|
```
|
26
26
|
|
@@ -32,7 +32,9 @@
|
|
32
32
|
|
33
33
|
```javascript
|
34
34
|
|
35
|
+
|
36
|
+
|
35
|
-
<!DOCTYPE html>
|
37
|
+
<!DOCTYPE html>
|
36
38
|
|
37
39
|
<html lang="ja">
|
38
40
|
|
@@ -44,11 +46,15 @@
|
|
44
46
|
|
45
47
|
function kaibun(){
|
46
48
|
|
49
|
+
let N=0;
|
50
|
+
|
51
|
+
let total=0;
|
52
|
+
|
47
53
|
let l=document.getElementById("source").length;
|
48
54
|
|
49
55
|
let n=document.getElementById("source").charAt(N);
|
50
56
|
|
51
|
-
|
57
|
+
|
52
58
|
|
53
59
|
|
54
60
|
|
2
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -44,19 +44,21 @@
|
|
44
44
|
|
45
45
|
function kaibun(){
|
46
46
|
|
47
|
-
let l=source.length;
|
47
|
+
let l=document.getElementById("source").length;
|
48
48
|
|
49
|
-
let n=source.charAt(N);
|
49
|
+
let n=document.getElementById("source").charAt(N);
|
50
|
+
|
51
|
+
let total=0;
|
50
52
|
|
51
53
|
|
52
54
|
|
53
|
-
for(let i=
|
55
|
+
for(let i=0;i<=l;i=n(l-1)-2n*(i++)){
|
54
56
|
|
55
57
|
total+=i;
|
56
58
|
|
57
59
|
}
|
58
60
|
|
59
|
-
|
61
|
+
document.getElementById("total").textContent = result;
|
60
62
|
|
61
63
|
}
|
62
64
|
|
1
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
-
|
5
|
+
|
6
6
|
|
7
7
|
javascriptで回文を作るページを作っています(回文を判定するものではありません)。
|
8
8
|
|
@@ -92,4 +92,4 @@
|
|
92
92
|
|
93
93
|
|
94
94
|
|
95
|
-
|
95
|
+
ブラウザはchrome、ツールはVisual Studio Codeです。
|