回答編集履歴
1
訂正
test
CHANGED
@@ -16,13 +16,13 @@
|
|
16
16
|
|
17
17
|
for (var i = 1; i <=9; i++) {
|
18
18
|
|
19
|
-
$tr = $("<tr>").attr("id","tr"+i).appendTo($table);
|
19
|
+
var $tr = $("<tr>").attr( "id", "tr"+i ).appendTo( $table );
|
20
20
|
|
21
21
|
|
22
22
|
|
23
|
-
for (var j =1; j <=9; j++){
|
23
|
+
for (var j =1; j <=9; j++) {
|
24
24
|
|
25
|
-
|
25
|
+
var
|
26
26
|
|
27
27
|
txt = i+ "*" +j+ "=" +(i*j),
|
28
28
|
|
@@ -34,7 +34,7 @@
|
|
34
34
|
|
35
35
|
bg = "#ffffff";
|
36
36
|
|
37
|
-
}else{
|
37
|
+
} else {
|
38
38
|
|
39
39
|
bg = "#cccccc";
|
40
40
|
|
@@ -55,6 +55,8 @@
|
|
55
55
|
```
|
56
56
|
|
57
57
|
|
58
|
+
|
59
|
+
* $( fn ) ... window.addEventListener("DOMContentLoaded", fn ) に等しい
|
58
60
|
|
59
61
|
* $elm = $("<tagName>") ... jQuery オブジェクトで包括した要素(以下、**jQuery要素**)を作成
|
60
62
|
|