hx-put

hx-put 属性会使元素向指定URL发送 PUT 请求,并使用交换策略将HTML插入到DOM中:

<button hx-put="/account" hx-target="body">
  存入资金到您的账户
</button>

这个示例会使 button/account 发送 PUT 请求,并将返回的HTML插入到 bodyinnerHTML 中。

注意事项