hx-encoding
hx-encoding
属性允许你将请求编码从通常的 application/x-www-form-urlencoded
编码切换到 multipart/form-data
,通常用于支持 ajax 请求中的文件上传。
¥The hx-encoding
attribute allows you to switch the request encoding from the usual application/x-www-form-urlencoded
encoding to multipart/form-data
, usually to support file uploads in an ajax request.
此属性的值应为 multipart/form-data
。
¥The value of this attribute should be multipart/form-data
.
hx-encoding
标签可以放在父元素上。
¥The hx-encoding
tag may be placed on parent elements.
¥Notes
hx-encoding
是继承的,可以放在父元素上
¥hx-encoding
is inherited and can be placed on a parent element