{"id":2007,"date":"2021-08-27T09:43:41","date_gmt":"2021-08-27T00:43:41","guid":{"rendered":"https:\/\/suzutukiblog.com\/?p=2007"},"modified":"2023-01-03T14:05:23","modified_gmt":"2023-01-03T05:05:23","slug":"javascript5","status":"publish","type":"post","link":"https:\/\/suzutukiblog.com\/index.php\/2021\/08\/27\/javascript5\/","title":{"rendered":"JavaScript5(DOM\u64cd\u4f5c\uff64class)"},"content":{"rendered":"<h3><a href=\"https:\/\/suzutukiblog.com\/index.php\/2021\/09\/13\/animation1\/\">\u30c6\u30ad\u30b9\u30c8\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u304b\u3089\u7d9a\u304f<\/a><\/h3>\n<h3>1:DOM\u64cd\u4f5c(\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u305f\u3081\u306e\u6587\u5b57\u5206\u5272)<\/h3>\n<h3>HTML\u306e\u8a18\u8ff0<\/h3>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-html\" data-lang=\"HTML\"><code>&lt;!DOCTYPE html&gt;\r\n&lt;html lang=\"en\"&gt;\r\n&lt;head&gt;\r\n  &lt;meta charset=\"UTF-8\"&gt;\r\n  &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;\r\n  &lt;meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\"&gt;\r\n  &lt;title&gt;Document&lt;\/title&gt;\r\n  &lt;link rel=\"stylesheet\" href=\"style.css\"&gt;\r\n  &lt;link href=\"https:\/\/fonts.googleapis.com\/css2?family=Teko:wght@500&amp;display=swap\" rel=\"stylesheet\"&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n  &lt;div id=\"container\"&gt;\r\n   &lt;div class=\"animate-title inview\"&gt;\r\n    SUPER ANIMATION\r\n   &lt;\/div&gt;\r\n    &lt;button onclick=\"document.querySelector('.animate-title').classList.toggle('inview');\"&gt;Animation&lt;\/button&gt;\r\n  &lt;\/div&gt;\r\n&lt;script src=\"main.js\"&gt;&lt;\/script&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/code><\/pre>\n<\/div>\n<h3>mixin\u306e\u8a18\u8ff0<\/h3>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-scss\" data-lang=\"SCSS\"><code>@mixin animation(\r\n  $name,\r\n  $duration: 1s,\r\n  $timing-function: ease,\r\n  $delay: 0s,\r\n  $iteration-count: 1,\r\n  $direction: normal,\r\n  $fill-mode: forwards\r\n) {\r\nanimation: {\r\n  name: $name;\r\n  duration: $duration;\r\n  timing-function: $timing-function;\r\n  delay: $delay;\r\n  iteration-count: $iteration-count;\r\n  direction: $direction;\r\n  fill-mode: $fill-mode;\r\n }\r\n}<\/code><\/pre>\n<\/div>\n<h3>SCSS\u306e\u8a18\u8ff0(\u30c6\u30ad\u30b9\u30c8\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u3068\u304d\u306b\u4f7f\u3063\u305f\u306e\u3068\u307b\u307c\u540c\u3058)<\/h3>\n<p><!--more--><\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-scss\" data-lang=\"SCSS\"><code>@import \"mixin\"; html { font-family: 'Teko', sans-serif; } body { margin: 0; } #container { position: relative; height: 100vh; background-color: teal; } .animate-title { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: white; opacity: 0; font-size: 2em; &amp;.inview { opacity: 1; &amp; .char { display: inline-block; @include animation( $name: kf-animate-chars, $duration: 0.5s, $timing-function: cubic-bezier(0.39, 1.57, 0.58, 1), $fill-mode: both ); @for $i from 1 through 20 { &amp;:nth-child(#{$i}) { animation-delay: $i * 0.04s; } } } } } @keyframes kf-animate-chars { 0% { opacity: 0; transform: translateY(-50%); } 100% { opacity: 1; transform: translateY(0); } }<\/code><\/pre>\n<\/div>\n<h3>main.js\u306e\u8a18\u8ff0<\/h3>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-js\" data-lang=\"JavaScript\"><code>\/\/ DOM\u304c\u751f\u6210\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u62c5\u4fdd\r\n\/\/ document.addEventListener(\"DOMContentLoaded\", function () {\r\n\/\/ const el = document.querySelector(\".animate-title\");\r\n\/\/ \/\/ \u4f59\u5206\u306a\u30b9\u30da\u30fc\u30b9(\u7a7a\u767d)\u3092\u53d6\u308a\u9664\u304f\r\n\/\/ \/\/ console.log(el.innerHTML.trim());\r\n\/\/ const str = el.innerHTML.trim();\r\n\/\/ let concatStr = '';\r\n\r\n\/\/ for (let c of str) {\r\n\/\/ \/\/ \u7a7a\u767d(\/\\s+\/\u3067\u3082OK)\u3092\u7f6e\u304d\u63db\u3048\u3066\u7121\u52b9\u306b\u3059\u308b\r\n\/\/ c = c.replace(' ', '\u00a0');\r\n\/\/ \/\/ \u4e00\u822c\u7684\u306a\u8a18\u6cd5\r\n\/\/ \/\/ console.log('&lt;span class=\"char\"&gt;' +c +'&lt;\/span&gt;');\r\n\/\/ \/\/ `\u3092\u4f7f\u3063\u305f\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30ea\u30c6\u30e9\u30eb\u306e\u8a18\u6cd5\r\n\/\/ \/\/ console.log(`&lt;span class=\"char\"&gt;${c}&lt;\/span&gt;`);\r\n\/\/ concatStr += `&lt;span class=\"char\"&gt;${c}&lt;\/span&gt;`;\r\n\/\/ }\r\n\/\/ el.innerHTML = concatStr;\r\n\/\/ });\r\n\r\n\/\/ reduce\u3092\u4f7f\u3046\u3068\u304d\u306e\u8a18\u8ff0\r\n  document.addEventListener(\"DOMContentLoaded\", function () {\r\n\/\/ .animate-title\u3092\u53d6\u5f97\r\n  const el = document.querySelector(\".animate-title\");\r\n  console.log(el);\r\n\/\/ Reduce\u3092\u4f7f\u3046\u5834\u5408\u914d\u5217\u306b\u306a\u304a\u3059\u5fc5\u8981\u304c\u3042\u308b\u306e\u3067\r\n  const str = el.innerHTML.trim().split(\"\");\r\n  console.log(str);\r\n  el.innerHTML = str.reduce((acc, curr) =&gt; {\r\n\/\/ \u30b9\u30da\u30fc\u30b9\u3092\u958b\u3051\u305f\u3044\u306e\u3067\u7a7a\u767d\u3092\u00a0\u306b\u7f6e\u304d\u63db\u3048\u308b\r\n  curr = curr.replace(\/\\s+\/, \"\u00a0\");\r\n  console.log(curr);\r\n\/\/ \u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30ea\u30c6\u30e9\u30eb\u3092\u7528\u3044\u3066\u7d44\u307f\u7acb\u3066\u305f\u6587\u5b57\u5217\u3092\u8fd4\u3059\r\n  return `${acc}&lt;span class=\"char\"&gt;${curr}&lt;\/span&gt;`;\r\n\/\/ \u521d\u671f\u5024\u3092\u7a7a\u767d\u306b\u3059\u308b\u3053\u3068\u3067acc\u3092''curr\u306b\u6700\u521d\u306e\u914d\u5217\u3092\u53d6\u308a\u51fa\u3059\r\n}, \"\");\r\n  console.log(el.innerHTML);\r\n});\r\n\r\n\/\/ Reduce\u3092\u4f7f\u3046\u5834\u5408concatStr\u3092\u5b9a\u7fa9\u3059\u308b\u5fc5\u8981\u304c\u306a\u304f\u306a\u3063\u305f\r\n\/\/ Reduce\u306a\u306e\u3067\u3001\u3067\u304d\u308b\u3053\u3068\u304c\u9650\u5b9a\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u30b3\u30fc\u30c9\u306e\u610f\u5473\u304c\u4ed6\u306e\u4eba\u306b\u308f\u304b\u308a\u3084\u3059\u3044<\/code><\/pre>\n<\/div>\n<p>console.log\u3092\u4f7f\u3046\u3068\u51e6\u7406\u306e\u6d41\u308c\u304c\u308f\u304b\u308a\u3084\u3059\u3044<\/p>\n<p>\u671f\u5f85\u3057\u3066\u3044\u305f\u3082\u306e\u304c\u751f\u6210\u3055\u308c\u305f<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/suzutukiblog.com\/wp-content\/uploads\/2021\/08\/d37359be5ebe35053e49de148d3d3d19.png\" alt=\"\" width=\"894\" height=\"1452\" class=\"alignnone size-full wp-image-7205\" srcset=\"https:\/\/suzutukiblog.com\/wp-content\/uploads\/2021\/08\/d37359be5ebe35053e49de148d3d3d19.png 894w, https:\/\/suzutukiblog.com\/wp-content\/uploads\/2021\/08\/d37359be5ebe35053e49de148d3d3d19-185x300.png 185w, https:\/\/suzutukiblog.com\/wp-content\/uploads\/2021\/08\/d37359be5ebe35053e49de148d3d3d19-630x1024.png 630w, https:\/\/suzutukiblog.com\/wp-content\/uploads\/2021\/08\/d37359be5ebe35053e49de148d3d3d19-768x1247.png 768w, https:\/\/suzutukiblog.com\/wp-content\/uploads\/2021\/08\/d37359be5ebe35053e49de148d3d3d19-624x1013.png 624w\" sizes=\"auto, (max-width: 894px) 100vw, 894px\" \/><\/p>\n<p>\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30ea\u30c6\u30e9\u30eb\u306f\u8aad\u3081\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u304a\u3053\u3046<\/p>\n<h3>2:class\u3092\u7528\u3044\u308b\u3068\u304d<\/h3>\n<h3>HTML\u306e\u8a18\u8ff0<\/h3>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-html\" data-lang=\"HTML\"><code>&lt;!DOCTYPE html&gt;\r\n&lt;html lang=\"en\"&gt;\r\n&lt;head&gt;\r\n  &lt;meta charset=\"UTF-8\"&gt;\r\n  &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;\r\n  &lt;meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\"&gt;\r\n  &lt;title&gt;Document&lt;\/title&gt;\r\n  &lt;link rel=\"stylesheet\" href=\"style.css\"&gt;\r\n  &lt;link href=\"https:\/\/fonts.googleapis.com\/css2?family=Teko:wght@500&amp;display=swap\" rel=\"stylesheet\"&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n  &lt;div id=\"container\"&gt;\r\n  &lt;div class=\"animate-title\"&gt;\r\n    PLAY ANIMATION\r\n  &lt;\/div&gt;\r\n  &lt;div class=\"animate-title-2\"&gt;\r\n    ANIMATE STRING\r\n  &lt;\/div&gt;\r\n&lt;button onclick=\"document.querySelector('.animate-title').classList.toggle('inview');\"&gt;Animation&lt;\/button&gt;\r\n&lt;\/div&gt;\r\n&lt;script src=\"main.js\"&gt;&lt;\/script&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/code><\/pre>\n<\/div>\n<h3>mixin\u306e\u8a18\u8ff0<\/h3>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-scss\" data-lang=\"SCSS\"><code>@mixin animation(\r\n$name,\r\n$duration: 1s,\r\n$timing-function: ease,\r\n$delay: 0s,\r\n$iteration-count: 1,\r\n$direction: normal,\r\n$fill-mode: forwards\r\n) {\r\nanimation: {\r\nname: $name;\r\nduration: $duration;\r\ntiming-function: $timing-function;\r\ndelay: $delay;\r\niteration-count: $iteration-count;\r\ndirection: $direction;\r\nfill-mode: $fill-mode;\r\n}\r\n}<\/code><\/pre>\n<\/div>\n<h3>SCSS\u306e\u8a18\u8ff0<\/h3>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-scss\" data-lang=\"SCSS\"><code>@import \"mixin\";\r\nhtml {\r\n\u00a0 font-family: \"Teko\", sans-serif;\r\n}\r\n\/\/ \u30d6\u30e9\u30a6\u30b6\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30de\u30fc\u30b8\u30f3\u3092\u3051\u3057\u3066\u4f59\u767d\u3092\u306a\u304f\u3059\r\nbody {\r\n\u00a0 margin: 0;\r\n}\r\n\r\n#container {\r\n\u00a0 position: relative;\r\n\/\/ \u753b\u9762\u3092\u7e26\u3044\u3063\u3071\u3044\u306b\u3059\u308b\r\n\u00a0 height: 100vh;\r\n\u00a0 background-color: teal;\r\n}\r\n\r\n.animate-title,\r\n.animate-title-2 {\r\n\/\/ position: absolute;\r\n\/\/ top: 50%;\r\n\/\/ left: 50%;\r\n\/\/ transform: translate(-50%, -50%);\r\n\u00a0 color: white;\r\n\u00a0 opacity: 0;\r\n\u00a0 font-size: 2em;\r\n\r\n\u00a0 &amp;.inview {\r\n\/\/ invuiew\u304c\u632f\u3089\u308c\u305f\u3068\u304d\u900f\u660e\u5ea6\u3092\u89e3\u9664\r\n\u00a0 \u00a0 opacity: 1;\r\n\r\n\u00a0 &amp; .char {\r\n\/\/ \u4e0a\u304b\u3089\u964d\u308a\u3066\u304f\u308b\u3088\u3046\u306b\u3059\u308bspan\u306a\u306e\u3067inline-block\u306b\u3057\u306a\u3044\u3068\u30c0\u30e1\r\n\r\n\u00a0 \u00a0 display: inline-block;\r\n\/\/ \u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u8a2d\u5b9a\r\n@include animation(\r\n$name: kf-animate-chars,\r\n$duration: 0.5s,\r\n$timing-function: cubic-bezier(0.39, 1.57, 0.58, 1),\r\n$fill-mode: both\r\n);\r\n\/\/ for\u6587\u3092\u4f7f\u3063\u30661\u304b\u30899\u307e\u3067\u306e\u51e6\u7406\u3092\u30eb\u30fc\u30d7\u3055\u305b\u3066\u3044\u308b\u3088\r\n@for $i from 1 through 20 {\r\n&amp;:nth-child(#{$i}) {\r\nanimation-delay: $i * 0.04s;\r\n\u00a0 \u00a0 }\r\n\u00a0 \u00a0}\r\n\u00a0 }\r\n\u00a0}\r\n}\r\n\r\n@keyframes kf-animate-chars {\r\n0% {\r\n\u00a0 opacity: 0;\r\n\/\/ \u6700\u521d\u900f\u660e\u3067\u4e0a\u65b9\u541150\uff05\u306e\u3068\u3053\u308d\u306b\u3044\u308b\r\n\u00a0 transform: translateY(-50%);\r\n}\r\n\r\n100% {\r\n\/\/ \u900f\u660e\u5316\u3092\u89e3\u9664\u3057\u306650\uff05\u304b\u3089\u539f\u70b9\u306b\u623b\u308b\u3053\u3068\u3067\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3057\u3066\u3044\u308b\u3088\u3046\u306b\u898b\u305b\u308b\r\n\u00a0 opacity: 1;\r\n\u00a0 transform: translateY(0);\r\n\u00a0}\r\n}<\/code><\/pre>\n<\/div>\n<h3>main.js\u306e\u8a18\u8ff0<\/h3>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-js\" data-lang=\"JavaScript\"><code>document.addEventListener('DOMContentLoaded', function () {\r\n\/\/ new\u3067\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u751f\u6210\u3055\u308c\u305f\u3068\u304d\u306b\u767a\u706b\r\n  const ta = new TextAnimation('.animate-title');\r\n  const ta2 = new TextAnimation('.animate-title-2');\r\n\/\/ 1\u79d2\u5f8c\u306b\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u304c\u958b\u59cb\u3055\u308c\u308b\u8a2d\u5b9a\r\n  setTimeout(() =&gt; {\r\n   ta.animate();\r\n   ta2.animate();\r\n  }, 1000);\r\n});\r\n\r\nclass TextAnimation {\r\n\/\/ \u30af\u30e9\u30b9\u304c\u521d\u671f\u5316\u3055\u308c\u308b\u6bb5\u968e\u3067\u5fc5\u305a\u547c\u3070\u308c\u308b\u95a2\u6570\r\n  constructor(el) {\r\n\/\/ \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\r\n    this.el = document.querySelector(el);\r\n    console.log(el)\r\n    console.log(this.el)\r\n    this.chars = this.el.innerHTML.trim().split(\"\");\r\n    console.log(this.chars)\r\n    this.el.innerHTML = this._splitText();\r\n    console.log(this.el.innerHTML)\r\n}\r\n\/\/ \u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30e1\u30bd\u30c3\u30c9(\u6697\u9ed9\u306e\u4e86\u89e3\u3067\u660e\u793a\u3057\u3066\u3044\u308b)\r\n  _splitText() {\r\n    return this.chars.reduce((acc, curr) =&gt; {\r\n      curr = curr.replace(\/\\s+\/, ' ');\r\n      return `${acc}&lt;span class=\"char\"&gt;${curr}&lt;\/span&gt;`;\r\n  }, \"\");\r\n}\r\n\/\/ inview\u306e\u3068\u304d\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u767a\u706b\u3001\u30d1\u30d6\u30ea\u30c3\u30af\u30e1\u30bd\u30c3\u30c9\r\n  animate() {\r\n    this.el.classList.toggle('inview');\r\n }\r\n}<\/code><\/pre>\n<\/div>\n<p>\u8ff7\u3063\u305f\u3089console.log\u3067\u78ba\u8a8d\u3059\u308b\u3068\u51e6\u7406\u306e\u6d41\u308c\u304c\u308f\u304b\u308a\u3084\u3059\u304f\u306a\u308b<\/p>\n<h3>5.5\u306b\u7d9a\u304d\u307e\u3059<\/h3>\n","protected":false},"excerpt":{"rendered":"<p>\u30c6\u30ad\u30b9\u30c8\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u304b\u3089\u7d9a\u304f 1:DOM\u64cd\u4f5c(\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u305f\u3081\u306e\u6587\u5b57\u5206\u5272) HTML\u306e\u8a18\u8ff0 &lt;!DOCTYPE html&gt; &lt;html lang=&#8221;en&#8221;&gt; &lt;head&gt; &#038;lt [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[17,27],"tags":[],"class_list":["post-2007","post","type-post","status-publish","format-standard","hentry","category-javascript","category-programming-note"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u30c6\u30ad\u30b9\u30c8\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u304b\u3089\u7d9a\u304f 1:DOM\u64cd\u4f5c(\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u305f\u3081\u306e\u6587\u5b57\u5206\u5272) HTML\u306e\u8a18\u8ff0\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"\u30aa\u30aa\u30bf\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/suzutukiblog.com\/index.php\/2021\/08\/27\/javascript5\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<meta property=\"og:locale\" content=\"ja_JP\" \/>\n\t\t<meta property=\"og:site_name\" content=\"\u3068\u3042\u308bIT\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u30d6\u30ed\u30b0 \u2014 \u6bce\u65e5\u5c11\u3057\u305a\u3064\u6210\u9577\u3059\u308b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"JavaScript5(DOM\u64cd\u4f5c\uff64class) \u2014 \u3068\u3042\u308bIT\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u30d6\u30ed\u30b0\" \/>\n\t\t<meta property=\"og:description\" content=\"\u30c6\u30ad\u30b9\u30c8\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u304b\u3089\u7d9a\u304f 1:DOM\u64cd\u4f5c(\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u305f\u3081\u306e\u6587\u5b57\u5206\u5272) HTML\u306e\u8a18\u8ff0\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/suzutukiblog.com\/index.php\/2021\/08\/27\/javascript5\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/suzutukiblog.com\/wp-content\/uploads\/2020\/03\/cropped-cropped-markus-spiske-s7nlaF3kefg-unsplash-1.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/suzutukiblog.com\/wp-content\/uploads\/2020\/03\/cropped-cropped-markus-spiske-s7nlaF3kefg-unsplash-1.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"512\" \/>\n\t\t<meta property=\"og:image:height\" content=\"316\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2021-08-27T00:43:41+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2023-01-03T05:05:23+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"JavaScript5(DOM\u64cd\u4f5c\uff64class) \u2014 \u3068\u3042\u308bIT\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u30d6\u30ed\u30b0\" \/>\n\t\t<meta name=\"twitter:description\" content=\"\u30c6\u30ad\u30b9\u30c8\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u304b\u3089\u7d9a\u304f 1:DOM\u64cd\u4f5c(\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u305f\u3081\u306e\u6587\u5b57\u5206\u5272) HTML\u306e\u8a18\u8ff0\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/suzutukiblog.com\/wp-content\/uploads\/2020\/03\/cropped-cropped-markus-spiske-s7nlaF3kefg-unsplash-1.jpg\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/suzutukiblog.com\\\/index.php\\\/2021\\\/08\\\/27\\\/javascript5\\\/#blogposting\",\"name\":\"JavaScript5(DOM\\u64cd\\u4f5c\\uff64class) \\u2014 \\u3068\\u3042\\u308bIT\\u30a8\\u30f3\\u30b8\\u30cb\\u30a2\\u306e\\u30d6\\u30ed\\u30b0\",\"headline\":\"JavaScript5(DOM\\u64cd\\u4f5c\\uff64class)\",\"author\":{\"@id\":\"https:\\\/\\\/suzutukiblog.com\\\/index.php\\\/author\\\/reim\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/suzutukiblog.com\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/suzutukiblog.com\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/d37359be5ebe35053e49de148d3d3d19.png\",\"@id\":\"https:\\\/\\\/suzutukiblog.com\\\/index.php\\\/2021\\\/08\\\/27\\\/javascript5\\\/#articleImage\",\"width\":894,\"height\":1452},\"datePublished\":\"2021-08-27T09:43:41+09:00\",\"dateModified\":\"2023-01-03T14:05:23+09:00\",\"inLanguage\":\"ja\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/suzutukiblog.com\\\/index.php\\\/2021\\\/08\\\/27\\\/javascript5\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/suzutukiblog.com\\\/index.php\\\/2021\\\/08\\\/27\\\/javascript5\\\/#webpage\"},\"articleSection\":\"JavaScript, Programming note\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/suzutukiblog.com\\\/index.php\\\/2021\\\/08\\\/27\\\/javascript5\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/suzutukiblog.com#listItem\",\"position\":1,\"name\":\"\\u30db\\u30fc\\u30e0\",\"item\":\"https:\\\/\\\/suzutukiblog.com\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/suzutukiblog.com\\\/index.php\\\/category\\\/javascript\\\/#listItem\",\"name\":\"JavaScript\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/suzutukiblog.com\\\/index.php\\\/category\\\/javascript\\\/#listItem\",\"position\":2,\"name\":\"JavaScript\",\"item\":\"https:\\\/\\\/suzutukiblog.com\\\/index.php\\\/category\\\/javascript\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/suzutukiblog.com\\\/index.php\\\/2021\\\/08\\\/27\\\/javascript5\\\/#listItem\",\"name\":\"JavaScript5(DOM\\u64cd\\u4f5c\\uff64class)\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/suzutukiblog.com#listItem\",\"name\":\"\\u30db\\u30fc\\u30e0\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/suzutukiblog.com\\\/index.php\\\/2021\\\/08\\\/27\\\/javascript5\\\/#listItem\",\"position\":3,\"name\":\"JavaScript5(DOM\\u64cd\\u4f5c\\uff64class)\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/suzutukiblog.com\\\/index.php\\\/category\\\/javascript\\\/#listItem\",\"name\":\"JavaScript\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/suzutukiblog.com\\\/#person\",\"name\":\"\\u30aa\\u30aa\\u30bf\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/suzutukiblog.com\\\/index.php\\\/2021\\\/08\\\/27\\\/javascript5\\\/#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a1120b253cda8359b20b212f47db49986c2aa710b6ba6ef5825e6871bdbb9c10?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"\\u30aa\\u30aa\\u30bf\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/suzutukiblog.com\\\/index.php\\\/author\\\/reim\\\/#author\",\"url\":\"https:\\\/\\\/suzutukiblog.com\\\/index.php\\\/author\\\/reim\\\/\",\"name\":\"\\u30aa\\u30aa\\u30bf\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/suzutukiblog.com\\\/index.php\\\/2021\\\/08\\\/27\\\/javascript5\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a1120b253cda8359b20b212f47db49986c2aa710b6ba6ef5825e6871bdbb9c10?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"\\u30aa\\u30aa\\u30bf\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/suzutukiblog.com\\\/index.php\\\/2021\\\/08\\\/27\\\/javascript5\\\/#webpage\",\"url\":\"https:\\\/\\\/suzutukiblog.com\\\/index.php\\\/2021\\\/08\\\/27\\\/javascript5\\\/\",\"name\":\"JavaScript5(DOM\\u64cd\\u4f5c\\uff64class) \\u2014 \\u3068\\u3042\\u308bIT\\u30a8\\u30f3\\u30b8\\u30cb\\u30a2\\u306e\\u30d6\\u30ed\\u30b0\",\"description\":\"\\u30c6\\u30ad\\u30b9\\u30c8\\u30a2\\u30cb\\u30e1\\u30fc\\u30b7\\u30e7\\u30f3\\u304b\\u3089\\u7d9a\\u304f 1:DOM\\u64cd\\u4f5c(\\u30a2\\u30cb\\u30e1\\u30fc\\u30b7\\u30e7\\u30f3\\u306e\\u305f\\u3081\\u306e\\u6587\\u5b57\\u5206\\u5272) HTML\\u306e\\u8a18\\u8ff0\",\"inLanguage\":\"ja\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/suzutukiblog.com\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/suzutukiblog.com\\\/index.php\\\/2021\\\/08\\\/27\\\/javascript5\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/suzutukiblog.com\\\/index.php\\\/author\\\/reim\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/suzutukiblog.com\\\/index.php\\\/author\\\/reim\\\/#author\"},\"datePublished\":\"2021-08-27T09:43:41+09:00\",\"dateModified\":\"2023-01-03T14:05:23+09:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/suzutukiblog.com\\\/#website\",\"url\":\"https:\\\/\\\/suzutukiblog.com\\\/\",\"name\":\"\\u3068\\u3042\\u308bIT\\u30a8\\u30f3\\u30b8\\u30cb\\u30a2\\u5fd7\\u671b\\u306e\\u30d6\\u30ed\\u30b0\",\"description\":\"\\u6bce\\u65e5\\u5c11\\u3057\\u305a\\u3064\\u6210\\u9577\\u3059\\u308b\",\"inLanguage\":\"ja\",\"publisher\":{\"@id\":\"https:\\\/\\\/suzutukiblog.com\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"JavaScript5(DOM\u64cd\u4f5c\uff64class) \u2014 \u3068\u3042\u308bIT\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u30d6\u30ed\u30b0","description":"\u30c6\u30ad\u30b9\u30c8\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u304b\u3089\u7d9a\u304f 1:DOM\u64cd\u4f5c(\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u305f\u3081\u306e\u6587\u5b57\u5206\u5272) HTML\u306e\u8a18\u8ff0","canonical_url":"https:\/\/suzutukiblog.com\/index.php\/2021\/08\/27\/javascript5\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/suzutukiblog.com\/index.php\/2021\/08\/27\/javascript5\/#blogposting","name":"JavaScript5(DOM\u64cd\u4f5c\uff64class) \u2014 \u3068\u3042\u308bIT\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u30d6\u30ed\u30b0","headline":"JavaScript5(DOM\u64cd\u4f5c\uff64class)","author":{"@id":"https:\/\/suzutukiblog.com\/index.php\/author\/reim\/#author"},"publisher":{"@id":"https:\/\/suzutukiblog.com\/#person"},"image":{"@type":"ImageObject","url":"https:\/\/suzutukiblog.com\/wp-content\/uploads\/2021\/08\/d37359be5ebe35053e49de148d3d3d19.png","@id":"https:\/\/suzutukiblog.com\/index.php\/2021\/08\/27\/javascript5\/#articleImage","width":894,"height":1452},"datePublished":"2021-08-27T09:43:41+09:00","dateModified":"2023-01-03T14:05:23+09:00","inLanguage":"ja","mainEntityOfPage":{"@id":"https:\/\/suzutukiblog.com\/index.php\/2021\/08\/27\/javascript5\/#webpage"},"isPartOf":{"@id":"https:\/\/suzutukiblog.com\/index.php\/2021\/08\/27\/javascript5\/#webpage"},"articleSection":"JavaScript, Programming note"},{"@type":"BreadcrumbList","@id":"https:\/\/suzutukiblog.com\/index.php\/2021\/08\/27\/javascript5\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/suzutukiblog.com#listItem","position":1,"name":"\u30db\u30fc\u30e0","item":"https:\/\/suzutukiblog.com","nextItem":{"@type":"ListItem","@id":"https:\/\/suzutukiblog.com\/index.php\/category\/javascript\/#listItem","name":"JavaScript"}},{"@type":"ListItem","@id":"https:\/\/suzutukiblog.com\/index.php\/category\/javascript\/#listItem","position":2,"name":"JavaScript","item":"https:\/\/suzutukiblog.com\/index.php\/category\/javascript\/","nextItem":{"@type":"ListItem","@id":"https:\/\/suzutukiblog.com\/index.php\/2021\/08\/27\/javascript5\/#listItem","name":"JavaScript5(DOM\u64cd\u4f5c\uff64class)"},"previousItem":{"@type":"ListItem","@id":"https:\/\/suzutukiblog.com#listItem","name":"\u30db\u30fc\u30e0"}},{"@type":"ListItem","@id":"https:\/\/suzutukiblog.com\/index.php\/2021\/08\/27\/javascript5\/#listItem","position":3,"name":"JavaScript5(DOM\u64cd\u4f5c\uff64class)","previousItem":{"@type":"ListItem","@id":"https:\/\/suzutukiblog.com\/index.php\/category\/javascript\/#listItem","name":"JavaScript"}}]},{"@type":"Person","@id":"https:\/\/suzutukiblog.com\/#person","name":"\u30aa\u30aa\u30bf","image":{"@type":"ImageObject","@id":"https:\/\/suzutukiblog.com\/index.php\/2021\/08\/27\/javascript5\/#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/a1120b253cda8359b20b212f47db49986c2aa710b6ba6ef5825e6871bdbb9c10?s=96&d=mm&r=g","width":96,"height":96,"caption":"\u30aa\u30aa\u30bf"}},{"@type":"Person","@id":"https:\/\/suzutukiblog.com\/index.php\/author\/reim\/#author","url":"https:\/\/suzutukiblog.com\/index.php\/author\/reim\/","name":"\u30aa\u30aa\u30bf","image":{"@type":"ImageObject","@id":"https:\/\/suzutukiblog.com\/index.php\/2021\/08\/27\/javascript5\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/a1120b253cda8359b20b212f47db49986c2aa710b6ba6ef5825e6871bdbb9c10?s=96&d=mm&r=g","width":96,"height":96,"caption":"\u30aa\u30aa\u30bf"}},{"@type":"WebPage","@id":"https:\/\/suzutukiblog.com\/index.php\/2021\/08\/27\/javascript5\/#webpage","url":"https:\/\/suzutukiblog.com\/index.php\/2021\/08\/27\/javascript5\/","name":"JavaScript5(DOM\u64cd\u4f5c\uff64class) \u2014 \u3068\u3042\u308bIT\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u30d6\u30ed\u30b0","description":"\u30c6\u30ad\u30b9\u30c8\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u304b\u3089\u7d9a\u304f 1:DOM\u64cd\u4f5c(\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u305f\u3081\u306e\u6587\u5b57\u5206\u5272) HTML\u306e\u8a18\u8ff0","inLanguage":"ja","isPartOf":{"@id":"https:\/\/suzutukiblog.com\/#website"},"breadcrumb":{"@id":"https:\/\/suzutukiblog.com\/index.php\/2021\/08\/27\/javascript5\/#breadcrumblist"},"author":{"@id":"https:\/\/suzutukiblog.com\/index.php\/author\/reim\/#author"},"creator":{"@id":"https:\/\/suzutukiblog.com\/index.php\/author\/reim\/#author"},"datePublished":"2021-08-27T09:43:41+09:00","dateModified":"2023-01-03T14:05:23+09:00"},{"@type":"WebSite","@id":"https:\/\/suzutukiblog.com\/#website","url":"https:\/\/suzutukiblog.com\/","name":"\u3068\u3042\u308bIT\u30a8\u30f3\u30b8\u30cb\u30a2\u5fd7\u671b\u306e\u30d6\u30ed\u30b0","description":"\u6bce\u65e5\u5c11\u3057\u305a\u3064\u6210\u9577\u3059\u308b","inLanguage":"ja","publisher":{"@id":"https:\/\/suzutukiblog.com\/#person"}}]},"og:locale":"ja_JP","og:site_name":"\u3068\u3042\u308bIT\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u30d6\u30ed\u30b0 \u2014 \u6bce\u65e5\u5c11\u3057\u305a\u3064\u6210\u9577\u3059\u308b","og:type":"article","og:title":"JavaScript5(DOM\u64cd\u4f5c\uff64class) \u2014 \u3068\u3042\u308bIT\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u30d6\u30ed\u30b0","og:description":"\u30c6\u30ad\u30b9\u30c8\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u304b\u3089\u7d9a\u304f 1:DOM\u64cd\u4f5c(\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u305f\u3081\u306e\u6587\u5b57\u5206\u5272) HTML\u306e\u8a18\u8ff0","og:url":"https:\/\/suzutukiblog.com\/index.php\/2021\/08\/27\/javascript5\/","og:image":"https:\/\/suzutukiblog.com\/wp-content\/uploads\/2020\/03\/cropped-cropped-markus-spiske-s7nlaF3kefg-unsplash-1.jpg","og:image:secure_url":"https:\/\/suzutukiblog.com\/wp-content\/uploads\/2020\/03\/cropped-cropped-markus-spiske-s7nlaF3kefg-unsplash-1.jpg","og:image:width":512,"og:image:height":316,"article:published_time":"2021-08-27T00:43:41+00:00","article:modified_time":"2023-01-03T05:05:23+00:00","twitter:card":"summary","twitter:title":"JavaScript5(DOM\u64cd\u4f5c\uff64class) \u2014 \u3068\u3042\u308bIT\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u30d6\u30ed\u30b0","twitter:description":"\u30c6\u30ad\u30b9\u30c8\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u304b\u3089\u7d9a\u304f 1:DOM\u64cd\u4f5c(\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u305f\u3081\u306e\u6587\u5b57\u5206\u5272) HTML\u306e\u8a18\u8ff0","twitter:image":"https:\/\/suzutukiblog.com\/wp-content\/uploads\/2020\/03\/cropped-cropped-markus-spiske-s7nlaF3kefg-unsplash-1.jpg"},"aioseo_meta_data":{"post_id":"2007","title":null,"description":null,"keywords":[],"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"BlogPosting","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":"{\"article\":{\"articleType\":\"BlogPosting\"},\"course\":{\"name\":\"\",\"description\":\"\",\"provider\":\"\"},\"faq\":{\"pages\":[]},\"product\":{\"reviews\":[]},\"recipe\":{\"ingredients\":[],\"instructions\":[],\"keywords\":[]},\"software\":{\"reviews\":[],\"operatingSystems\":[]},\"webPage\":{\"webPageType\":\"WebPage\"}}","pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2021-03-21 18:29:52","updated":"2025-06-04 14:39:49","seo_analyzer_scan_date":null},"_links":{"self":[{"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/posts\/2007","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/comments?post=2007"}],"version-history":[{"count":22,"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/posts\/2007\/revisions"}],"predecessor-version":[{"id":7206,"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/posts\/2007\/revisions\/7206"}],"wp:attachment":[{"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/media?parent=2007"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/categories?post=2007"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/tags?post=2007"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}