Closed zizhuxuaner closed 2 years ago
Why would you want that? a and b[c] are both empty arrays, so there's nothing there to serialize. a=
and b[c]=
mean something different.
你为什么要那个?a 和 b[c] 都是空数组,所以没有什么可以序列化的。
a=
并b[c]=
意味着不同的东西。
Can I keep fields? Because the backend needs these fields to determine what to submit. For example, I have a checkbox that allows you to select nothing, and the result is an empty array. demo:https://element.eleme.cn/#/zh-CN/component/checkbox
The proper way to handle this with checkboxes on the web is a hidden input with the same name, placed in the HTML before the checkboxes, so that the backend makes a decision based on explicit input and never based implicitly on the lack of input.
The proper way to handle this with checkboxes on the web is a hidden input with the same name, placed in the HTML before the checkboxes, so that the backend makes a decision based on explicit input and never based implicitly on the lack of input.
Thank you very much. I know what's wrong with me. Thank you
{ a: [], b:{ c: [], }, e: '111' } =====> a=&b[c]=&e=111
How to implement such parsing