<!DOCTYPE html> <html> <body>

<h1>My First Web Page</h1>

<p>My First Paragraph.</p>

<button onclick="myFunction()">点击这里</button>

<script> function myFunction() { document.write("在html文件加载完成后在调用myFunction()糟糕!文档消失了。"); } </script>

</body> </html>

 

相关文章:

  • 2021-04-12
  • 2021-07-06
  • 2021-04-08
  • 2021-11-12
  • 2021-04-08
  • 2021-04-15
  • 2021-05-25
猜你喜欢
  • 2022-12-23
  • 2021-11-30
  • 2021-12-09
  • 2021-11-20
  • 2022-01-07
  • 2022-01-07
  • 2021-09-19
相关资源
相似解决方案