Alert的功能是弹出对话框并显示其中的内容,用法如下:

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>函数调用</title>
   <script type="text/javascript">
     function  contxt() //定义函数
      {
         alert("这是弹出窗口");
      }
   </script>
</head>
<body>
   <form>
      <input type="button"  value="试一试" onclick="contxt()    " />  <!--html中定义一个button,点击时触发alter()函数-->
   </form>
</body>
</html>

Javascript的Alert函数功能

相关文章:

  • 2021-04-10
  • 2021-07-07
  • 2021-09-27
  • 2021-10-04
  • 2021-12-05
  • 2021-11-15
  • 2021-11-11
猜你喜欢
  • 2021-11-04
  • 2022-12-23
  • 2022-12-23
  • 2021-10-18
  • 2021-10-06
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案