4.事件.html 617 B

123456789101112131415161718192021222324252627
  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. <style>
  8. .box {
  9. width: 200px;
  10. height: 200px;
  11. background: #f00;
  12. }
  13. .box1 {
  14. width: 100px;
  15. height: 100px;
  16. background: #00f;
  17. }
  18. </style>
  19. </head>
  20. <body>
  21. <div class="box">
  22. <div class="box1"></div>
  23. </div>
  24. <input type="text" id="inp" placeholder="请输入内容">
  25. <script src="../js/4.事件.js"></script>
  26. </body>
  27. </html>