{"id":1646,"date":"2021-08-09T15:30:08","date_gmt":"2021-08-09T06:30:08","guid":{"rendered":"http:\/\/www.agile-software.site\/?p=1646"},"modified":"2021-09-05T15:43:48","modified_gmt":"2021-09-05T06:43:48","slug":"javascripttable","status":"publish","type":"post","link":"https:\/\/agile-software.net\/?p=1646","title":{"rendered":"JavaScript[table]"},"content":{"rendered":"\n<p>\u30bb\u30eb\u306e\u30b9\u30bf\u30a4\u30eb\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>&lt;head&gt;\n  &lt;meta charset=&quot;utf-8&quot;&gt;\n  &lt;title&gt;\u30c6\u30b9\u30c8&lt;\/title&gt;\n  &lt;style&gt;\n  table { border-collapse: collapse; }\n  td { width: 50px; height: 50px; border: solid 1px; }\n  &lt;\/style&gt;\n &lt;\/head&gt;<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u884c\u3092\u8ffd\u52a0\u3059\u308b<\/h2>\n\n\n\n<p>n\u306b-1\u3068\u3059\u308b\u3053\u3068\u3067\u6700\u5f8c\u306e\u884c\u3068\u3057\u3066\u8ffd\u52a0\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-jin-gb-block-box-with-headline kaisetsu-box5\"><div class=\"kaisetsu-box5-title\">insertRow<\/div>\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>table\u8981\u7d20 . insertRow(n)<\/code><\/pre><\/div>\n<\/div>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>  var tstTbl = document.getElementById(&quot;testTBL&quot;);<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u30bb\u30eb\u3092\u8ffd\u52a0\u3059\u308b<\/h2>\n\n\n\n<p>row\u306b\u5bfe\u3057\u3066insertCell\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-jin-gb-block-box-with-headline kaisetsu-box5\"><div class=\"kaisetsu-box5-title\">insertCell<\/div>\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>tr\u8981\u7d20 . insertCell(n)<\/code><\/pre><\/div>\n<\/div>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>  var row = tstTbl.insertRow(-1);<\/code><\/pre><\/div>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>&lt;body&gt;\n  &lt;table id=&quot;testTBL&quot;&gt;&lt;\/table&gt;\n\n  &lt;script&gt;\n  var tstTbl = document.getElementById(&quot;testTBL&quot;);\n  var row = tstTbl.insertRow(-1);\n  for (var i = 0; i &lt; 3; i++) row.insertCell(-1);\n  &lt;\/script&gt;\n \n\n&lt;\/body&gt;<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u30bb\u30eb\u306e\u30b9\u30bf\u30a4\u30eb\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002 \u884c\u3092\u8ffd\u52a0\u3059\u308b n\u306b-1\u3068\u3059\u308b\u3053\u3068\u3067\u6700\u5f8c\u306e\u884c\u3068\u3057\u3066\u8ffd\u52a0\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u30bb\u30eb\u3092\u8ffd\u52a0\u3059\u308b row\u306b\u5bfe\u3057\u3066insertCell\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":1733,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jin_ogp_image_url":"","_jin_last_featured_id":0,"footnotes":""},"categories":[6],"tags":[],"class_list":["post-1646","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript"],"_links":{"self":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/1646","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1646"}],"version-history":[{"count":1,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/1646\/revisions"}],"predecessor-version":[{"id":1647,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/1646\/revisions\/1647"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/media\/1733"}],"wp:attachment":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1646"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1646"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1646"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}