From d240ecb159d179644b1b03caf15f5db2aacdc4e2 Mon Sep 17 00:00:00 2001 From: Cardcaot Date: Fri, 15 May 2020 07:55:40 +0900 Subject: [PATCH] Update index.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit パレットの色数を間違えていたので修正 --- index.html | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index 0458c3d..8f4a82a 100644 --- a/index.html +++ b/index.html @@ -198,16 +198,13 @@ //カラー選択関数 function Color(obj){ - try { - for ( i = 1; i <= 18; i++ ) { - id_name = "color_" + i; - if (id_name == obj.id){ - document.getElementById(id_name).classList.add('active'); - } else { - document.getElementById(id_name).classList.remove('active'); - } + for ( i = 1; i <= 15; i++ ) { + id_name = "color_" + i; + if (id_name == obj.id){ + document.getElementById(id_name).classList.add('active'); + } else { + document.getElementById(id_name).classList.remove('active'); } - } catch (error) { } }