代码示例:(标识:htmldom_article_get)
<!DOCTYPE html>
<html>
<body>

<h3>如何访问 ARTICLE 元素的演示</h3>

<article id="myArticle">
  <h1>Article Heading</h1>
  <p>Some article text..</p>
</article>

<p>点击按钮将文章内容的文字颜色设置为红色。</p>

<button onclick="myFunction()">试一试</button>

<script>
function myFunction() {
  var x = document.getElementById("myArticle");
  x.style.color = "red";
}
</script>

</body>
</html>
运行结果: