index.html 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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>CSS Demo</title>
  7. <!-- You just include the css file as usual -->
  8. <link rel="stylesheet" href="/css/XP.css">
  9. <script src="/js/jquery-3.7.1.min.js"></script>
  10. </head>
  11. <body>
  12. <div class="window" style="margin: 32px; width: 250px">
  13. <div class="title-bar">
  14. <div class="title-bar-text">
  15. My First Program
  16. </div>
  17. <div class="title-bar-controls">
  18. <button aria-label="Minimize"></button>
  19. <button aria-label="Maximize"></button>
  20. <button aria-label="Close"></button>
  21. </div>
  22. </div>
  23. <div class="window-body">
  24. <p id="text">Hello, world!</p>
  25. <section class="field-row" style="justify-content: flex-end">
  26. <button id="okbtn">OK</button>
  27. <button id="cancelbtn">Cancel</button>
  28. </section>
  29. </div>
  30. </div>
  31. <script>
  32. $(document).ready(function(){
  33. $("#okbtn").click(function(){
  34. $("#text").text("You clicked OK");
  35. });
  36. $("#cancelbtn").click(function(){
  37. $("#text").text("You clicked Cancel");
  38. });
  39. });
  40. </script>
  41. </body>
  42. </html>