hx-prompt
hx-prompt
属性允许你在发出请求之前显示提示。提示的值将包含在 HX-Prompt
标头中的请求中。
¥The hx-prompt
attribute allows you to show a prompt before issuing a request. The value of
the prompt will be included in the request in the HX-Prompt
header.
这是一个例子:
¥Here is an example:
<button hx-delete="/account" hx-prompt="Enter your account name to confirm deletion">
Delete My Account
</button>
¥Notes
hx-prompt
是继承的,可以放在父元素上
¥hx-prompt
is inherited and can be placed on a parent element