uncloud-mravi/uncloud_v5/frontend/foo.html
2026-06-13 07:29:34 +02:00

32 lines
781 B
HTML

<html>
<head>
<title>test</title>
<script src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.10/dist/htmx.min.js"
integrity="sha384-H5SrcfygHmAuTDZphMHqBJLc3FhssKjG7w/CeCpFReSfwBWDTKpkzPP8c+cLsK+V"
crossorigin="anonymous"></script>
<!-- have a button POST a click via AJAX -->
</head>
<body>
<div id=parent-div>
original foo
</div>
<div id=post>
<button hx-post="http://localhost:8000/clicked"
hx-trigger="click"
hx-target="#parent-div"
hx-swap="outerHTML">
Click Me!
</button>
</div>
<div id=get>
<button hx-get="http://localhost:8000/"
hx-trigger="click"
hx-target="#parent-div"
hx-swap="outerHTML">
Click Me!
</button>
</div>
</body>
</html>