回答編集履歴
2
ループ内の変数を$countのままにしていた(これでは元の木阿弥でした)
test
CHANGED
@@ -22,11 +22,11 @@
|
|
22
22
|
|
23
23
|
(function(count){
|
24
24
|
|
25
|
-
document.getElementsByTagName("li")[
|
25
|
+
document.getElementsByTagName("li")[count].onclick = function(){
|
26
26
|
|
27
27
|
|
28
28
|
|
29
|
-
location.href = "index" +
|
29
|
+
location.href = "index" + count + ".html";
|
30
30
|
|
31
31
|
};
|
32
32
|
|
1
ドット抜けの修正を忘れていた
test
CHANGED
@@ -26,7 +26,7 @@
|
|
26
26
|
|
27
27
|
|
28
28
|
|
29
|
-
location.href = "index" + $count + "html";
|
29
|
+
location.href = "index" + $count + ".html";
|
30
30
|
|
31
31
|
};
|
32
32
|
|