OSDN Git Service

[fix] : 要素の初期化としてnullの代わりに空文字を代入する
authorhayao <hayao@fascode.net>
Fri, 6 Aug 2021 12:48:07 +0000 (21:48 +0900)
committerhayao <hayao@fascode.net>
Fri, 6 Aug 2021 12:48:07 +0000 (21:48 +0900)
sanmoku/index.html
sanmoku/script/init.js
sanmoku/script/main.js

index 44be627..285e096 100644 (file)
@@ -33,7 +33,7 @@
         </form>\r
 \r
         <!-- ゲーム本体 -->\r
-        <p><table id="maintable"></table></p>\r
+        <table id="maintable"></table>\r
 \r
         <!-- メッセージが表示される場所 -->\r
         <p id="msg"></p>\r
index 48cb7c2..f1366e5 100644 (file)
@@ -1,6 +1,6 @@
 // 初期化をする関数\r
 const InitilizeTable = function() {\r
-    MainTable.innerHTML = null;\r
+    MainTable.innerHTML = "";\r
     for (y = 0 ; y < TableYNumber; y++){ // 行を作成するループ\r
         \r
         // 行を作成する\r
index 40b4371..fcde2fd 100644 (file)
@@ -89,7 +89,7 @@ ApplyButton.addEventListener("click", function(){
     GameEnded     = false;
     CheckedBox    = 0;
     CurrentPlayer = 0;
-    Msg.innerText = null;
+    Msg.innerText = "";
 
     // 入力された値が正常か確認
     if(InputTableX.value >= 3 && InputTableY.value >= 3){