1,改变 HTML 输出流

  <script>

  document.write(Date());

 </script>

2,改变 HTML 内容

  <script>

  document.getElementById("p1").innerHTML="New text!";

 </script>

3,改变thml属性

<!DOCTYPE html>
<html>
<body>

<img >

<script>
document.getElementById("image").src="landscape.jpg";
</script>

</body>
</html>
 

相关文章:

  • 2021-11-29
  • 2021-12-19
  • 2021-10-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-27
  • 2022-12-23
  • 2021-10-22
  • 2022-12-23
  • 2022-02-13
  • 2021-11-29
  • 2021-12-05
相关资源
相似解决方案