是否可以将元素包装在头部内

时间:2019-05-13 19:26:45

标签: javascript html html5 dom head

对于通过dom进行无提示更改页面,我认为将头部的某些相关子元素包装在一起可能会有所帮助,但是我找不到能做到这一点的任何元素类型。

注入和删除单个元素感觉不正确,并且替换整个头部内容至少在我的firefox和chrome中导致短暂的毛刺,这可能是因为短时间缺少了CSS。

<html>

<head>
  <thingy class="generalStuff">
    <meta name="viewport" content="..." />
    <script src="..."></script>
  </thingy>
  <thingy class="forThisPage">
    <script src="..."></script>
    <script src="..."></script>
  </thingy>
</head>

<body>
  ...
</body>

</html>

0 个答案:

没有答案
相关问题