<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>菜鸟教程(runoob.com)</title>
</head>
<body>

<p );
h.appendChild(t);
document.body.appendChild(h);
};

</script>

</body>
</html>

 

 

document.createElement()    创建元素节点

document.createAttribute()   创建一个属性节点

document.createTextNode() 创建文本节点

 

相关文章:

  • 2021-04-06
  • 2021-07-02
  • 2021-08-14
  • 2021-12-19
  • 2021-08-14
  • 2021-09-03
  • 2021-08-27
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-28
相关资源
相似解决方案