Closed SheldonSir closed 5 years ago
Ok, this is my fault.
The jquery.serializeArray() method uses the standard W3C rules for successful controls to determine which elements it should include; in particular the element cannot be disabled and must contain a name attribute.
You got it. The disabled
property is not assumed to be inherited from parent elements. The input needs to have its own disabled
property.
After I set the input style to disabled, the result of jQuery.serializeJSON() will be an empty json object. Of course this is the result I want.
If I set the style of the div to disabled, due to the inheritance relationship, its child element input style should also be disabled, but the result obtained by jquery.serializeJSON() is