03.html 637 B

1234567891011121314151617181920212223242526
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title id="page-title">HTMX Demos</title>
  6. <script src="htmx-1-9-12.min.js"></script>
  7. <link rel="stylesheet" href="styles.css"/>
  8. </head>
  9. <body>
  10. <h1 id="title">Demo</h1>
  11. <h2>hx-trigger: <code>^L</code> keyboard shortcut</h2>
  12. <nav hx-get="/autonum/nav" hx-trigger="load"></nav>
  13. <div id="main">
  14. <div class="list"></div>
  15. <button
  16. hx-post="/contacts"
  17. hx-target="#main .list"
  18. hx-swap="innerHTML"
  19. hx-trigger="click,keyup[ctrlKey && key == 'l'] from:body">
  20. Contacts
  21. </button>
  22. </div>
  23. </body>
  24. </html>