答案 0 :(得分:0)
您可以使用 Element.removeAttribute() 方法从元素中删除所需的属性。在这种情况下,您可以执行以下操作:
document.body.removeAttribute("itemtype");
document.body.removeAttribute("itemscope");
答案 1 :(得分:0)
这可以通过在谷歌标签管理器中添加这个自定义 HTML 标签来完成:
<script>
var body = document.getElementsByTagName('body')[0];
body.removeAttribute("itemtype");
body.removeAttribute("itemscope");
</script>