Disabled form inputs do not appear in the request

后端 未结 11 1900
暗喜
暗喜 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 05:09

    You can totally avoid disabling, it is painful since html form format won't send anything related to

    or some other label.

    So you can instead put regular

    
    

    add this readonly="readonly"

    It wouldn't disable your text but wouldn't change by user so it work like

    and will send value through form. Just remove border if you would like to make it more like

    tag

提交回复
热议问题