hx-post
Thehx-post
attribute will cause an element to issue aPOST
to the specified URL and swapthe HTML into the DOM using a swap strategy:
<buttonhx-post="/account/enable"hx-target="body"> Enable Your Account</button>
This example will cause thebutton
to issue aPOST
to/account/enable
and swap the returned HTML intotheinnerHTML
of thebody
.
hx-post
is not inherited