After the form form input box input sets the disable attribute and submits it, the value of the input box cannot be obtained. To solve this type of problem, you can refer to the following two methods:
Method one:Use readonly instead of disabled, that is, put
disabled=disabled
Modify to
readonly=readonly
Disabled cannot receive focus and will be skipped when using the tab key, which may not be successful;
readonly can receive focus but cannot be modified, and can be navigated using the tab key, which may be successful.
Note: Only successful form elements are valid data, that is, the value can be obtained after submission. The value attribute of disabled and readonly text input boxes can only be modified through scripts.
Method two:Use a type=hidden to hide the input to get the value, and then use disabled to display the input to the user.
<input type=hidden name=url value=http://www.neirong.org/><input type=text value=http://www.neirong.org disabled=disabled/>Summarize
The above is the solution that the editor introduces to you when the html form form input is submitted using disabled and the form value cannot be obtained. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. . I would also like to thank everyone for your support of the VeVb martial arts website!