Input read-only property
There are two ways to achieve the read-only effect of input: Disabled and readonly. Naturally both of the effects are only readable can not be edited, but the two are very different. Disabled indicates that the input is invalid and its value is not passed to any program, such as ASP, PHP, and so on. ReadOnly is simply not editable and does not affect the delivery of its values. Disabled use: <input type= "text" name= "username" value= "James" disabled> ReadOnly using: <input type= "text" name= "PartNumber" value= "1500″readonly> |
Disabled method to pass a value,
The first method:
You can add a hidden input tag <input name= "Hiddenplanyear" id= "Hiddenplanyear" type= "hidden" class= "TextField" value= "/>
The second method:
<input type= "text" class= "Input4" id= "Mainchkusername" name= "Task.mainchkusername" value= "${sessionscope.qm_ Login_session.name} "disabled=" true "/>
In the saved method.
$ ("#mainChkUserName"). attr ("disabled", false);
Cancel invalid on line.
JavaScript settings Input Box read-only property gets the value after disabled and passes to the background