Values of disabled inputs will not be submitted

前端 未结 7 2211

This is what I found by Firebug in Firefox.

Is it the same in other browsers?

If so, what\'s the reason for this?

7条回答
  •  北海茫月
    2020-11-22 06:09

    They don't get submitted, because that's what it says in the W3C specification.

    17.13.2 Successful controls

    A successful control is "valid" for submission. [snip]

    • Controls that are disabled cannot be successful.

    In other words, the specification says that controls that are disabled are considered invalid and should not be submitted.

提交回复
热议问题