disable tag values do not pass values to the server
<input type="text" name="did" value="${dept.did}" disabled="disabled"/><br/>
solution
-
replace the field disabled in the form with readonly (if necessary, add a gray background color to the form)
<input type="text" name="did" value="${dept.did}" readonly/><br/>
li>
-
you can write a hidden attributes, one for the value of a is used to display p> li> ol>
for example: add a hidden TAB and the name and value are set to the same value as the disable tag to successfully pass the value
<input type="hidden" name="did" value="${dept.did}" > <input type="text" value="${dept.did}" disabled="disabled"/><br/>
disabled
similarity
- can make text boxes cannot be entered.
- can be modified by js script.
- want to cancel, can only delete the corresponding attribute, set flase invalid
different points
disabled
- input cannot receive focus
- using the TAB key will skip the element
- disabled will not respond to any event (e.g. the click event is invalid). The value of the disabled element
- is not committed. The
- disabled property can be used on all form elements.
readonly
- input can receive focus
- use the TAB key does not skip elements
- readonly will respond to events.
- readonly element values are submitted. The
- readonly property is only valid for type= “text”, textarea, and type= “password”.
disabled
will not be submitted to the server can’t be serialized but can be js can’t be modified on the interface all controls havedisabled
propertyreadonly
will be submitted to the server can be serialized can be js value assignment interface can’t modify all controls not necessarily havereadonly
property such asselect
drop down box
Read More:
- [Bug] Solve the problem that Acrobat cannot be opened: failed to connect to a DDE server
- How to increase the effect of onchange event after adding readonly attribute to input tag and display time of laydate plug-in
- One of the ways to solve the problem of internal server error in flash learning
- To solve the problem in Windows opencv installation: error configuration process, project files may be invalid
- Solve the problem that data cannot be input in idea console
- Solve the problem that the header file of “graphics. H” cannot be loaded in vs2015
- Problem solving: PDF cannot be opened, and acrobat failed to connect to a DDE server appears
- The browser requires that samesite by default cookies be disabled
- To solve the problem of failed to load: data in HTML5 game running rmmv locally/ actors.json problem
- Maven error: index downloads are disabled, search result may be incomplete
- The video cannot be played because you have disabled the cookie
- Iphone network data is shared to ubuntu14.04 through ubs, which is a desktop computer and cannot be passed through hotspot
- Solve the problem of keyboard interactive authentication with the SSH2 server failed
- Solve the problem that Windows 7 cannot be updated automatically_ Prompt error code 80246008
- Systemctl command doesn’t exist. How to solve the problem that the service can’t be started
- 530 user cannot log in. Problem connecting to FTP server
- Failed in Android compilation: solution to setup Jack server problem
- Solve the problem that TeamViewer software prompts that the trial period has expired and cannot be operated remotely
- Solve the problem that Gabor can’t start itself after the server is restarted
- Solve the problem that CEPH dashboard cannot be accessed