Disabled form inputs do not appear in the request

后端 未结 11 1892
暗喜
暗喜 2020-11-22 04:37

I have some disabled inputs in a form and I want to send them to a server, but Chrome excludes them from the request.

Is there any workaround for this without addin

11条回答
  •  时光说笑
    2020-11-22 04:58

    If you absolutely have to have the field disabled and pass the data you could use a javascript to input the same data into a hidden field (or just set the hidden field too). This would allow you to have it disabled but still post the data even though you'd be posting to another page.

提交回复
热议问题