12.提示框.html 496 B

1234567891011121314151617181920
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Document</title>
  7. </head>
  8. <body>
  9. <script>
  10. // alert("xxx");//警告框
  11. // confirm("提示内容");//确认框
  12. // window.alert("你好")
  13. // 提示框
  14. // prompt("提示的内容信息",默认内容);
  15. var a = prompt("提示的内容信息",20);
  16. console.log(a)
  17. </script>
  18. </body>
  19. </html>