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