]."/> ].">
Home > Article > Web Front-end > How to make input non-editable in css
Css method to make input uneditable: 1. Set [onfocus=this.blur()] to leave the focus when the mouse cannot be placed; 2. Set disabled, the code is [ecaf97038f2a17be9169cd8a5bf4ffff].
The operating environment of this tutorial: windows7 system, css3 version, DELL G3 computer.
Css method to make input non-editable:
Method 1: onfocus=this.blur() Leave the focus when the mouse cannot be placed
<input type="text" name="input1" value="()" onfocus=this.blur()>
Method 2: readonly
<input type="text" name="input1" value="()" readonly> <input type="text" name="input1" value="中国" readonly="true">
Method 3: disabled
<input type="text" name="input1" value="()" disabled="true">
Extended information:
Grammar Input (number, [#]filenumber) The syntax of the Input function has the following Part: Part description number is required. Any valid numeric expression specifying the number of characters to return. filenumber is required. Any valid file number. Note: Print # or Put is usually used to write the data read by the Input function into a file.
The Input function is only used for files opened in Input or Binary mode. Unlike the Input # statement, the Input function returns all characters it reads, including commas, carriage returns, blank columns, newlines, quotation marks, leading spaces, etc. For files opened with Binary access type, if you try to read the entire file using the Input function, an error will occur when EOF returns True.
Related tutorial recommendations: CSS video tutorial
The above is the detailed content of How to make input non-editable in css. For more information, please follow other related articles on the PHP Chinese website!