diff --git a/dbl.js b/dbl.js index af4bff3..98a4672 100644 --- a/dbl.js +++ b/dbl.js @@ -1,14 +1,12 @@ function dblSize() { - var pElements = document.queySelectorAll("p"); - if (pElements.Lenght == 0) { - alert("p要素はこの文章にはありません。"); - } else { - for (let i of pElements) { - i.style.fontSize = "200%"; - } + var p_elm = document.querySelectorAll("p"); + if (p_elm.length == 0) { + } else { + for (let i of p_elm) { + i.style.fontSize = "200%"; } + } } -function clickIT() { - document.addEventListener("click", dblSize, false); -} -document.addEventListener("DOMContentLoaded", clickIT, false); +document.addEventListener("DOMContentLoaded", function(e){ + document.body.addEventListener("click", dblSize); +}); diff --git a/map/domon/domon.html b/map/domon/domon.html index 93e22e2..18ade7c 100644 --- a/map/domon/domon.html +++ b/map/domon/domon.html @@ -3,19 +3,21 @@