「sandbox/js/2」の編集履歴(バックアップ)一覧に戻る

sandbox/js/2 - (2019/03/28 (木) 18:50:50) のソース

#html2(){{{{{
<div id="test-style" style="display: none;"><!--
.zeb table
{
  table-layout: fixed;
}
.zeb td:nth-child(3) { width: 20px; }
.zeb td:nth-child(9),
.zeb td:nth-child(12),
.zeb td:nth-child(14) { width: 15px; }
.zeb td:nth-child(1) { width: 70px; }
.zeb td:nth-child(2),
.zeb td:nth-child(13) { width: 100px; }
.zeb td:nth-child(4),
.zeb td:nth-child(5),
.zeb td:nth-child(6),
.zeb td:nth-child(7),
.zeb td:nth-child(8) { width: 40px; }
.zeb td:nth-child(10),
.zeb td:nth-child(11) { width: 260px; }
.zeb td:nth-child(15) { width: 150px; }
--></div>
}}}}}
#js(){{{{{
<script type="text/javascript">
(function() {
  for (var i = 0, root = document.getElementById('test-style'), nodes = root.childNodes; i < nodes.length; i++) {
    if (nodes[i].nodeType === document.COMMENT_NODE) {
      var elem = document.createElement('style');
      elem.type = 'text/css';
      elem.setAttribute('media', 'screen');
      if (elem.styleSheet) elem.styleSheet.cssText = nodes[i].data;
      else elem.appendChild(document.createTextNode(nodes[i].data));
      document.getElementsByTagName('head').item(0).appendChild(elem);
      root.parentNode.removeChild(root);
      break;
    }
  }
})();
</script>
}}}}}