hx-patch
hx-patch 属性会使元素向指定URL发送 PATCH 请求,并使用交换策略将HTML插入到DOM中:
PATCH
<button hx-patch="/account" hx-target="body"> 更新您的账户 </button>
这个示例会使 button 向 /account 发送 PATCH 请求,并将返回的HTML插入到 body 的 innerHTML 中。
button
/account
body
innerHTML