06.html 743 B

123456789101112131415161718192021222324252627
  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>Including static values with <code>hx-vals</code></h2>
  12. <nav hx-get="/autonum/nav" hx-trigger="load"></nav>
  13. <div id="main">
  14. <label for="search">Search Contacts:</label>
  15. <input id="search" name="q" type="search" placeholder="Search Contacts">
  16. <button hx-get="/search"
  17. hx-target="#main .results"
  18. hx-include="#search"
  19. hx-vals='{"state":"Montana"}'>
  20. Search The Contacts
  21. </button>
  22. <div class="results"></div>
  23. </div>
  24. </body>
  25. </html>