hx-patch
hx-patch 属性会使元素向指定的 URL 发出 PATCH 请求,并将 HTML 使用交换策略替换到 DOM 中
PATCH
<button hx-patch="/account" hx-target="body"> Patch Your Account </button>
此示例将使 button 向 /account 发出 PATCH 请求,并将返回的 HTML 替换到 body 的 innerHTML 中。
button
/account
body
innerHTML