How to implement the unavailable read-only HTML text box
This article mainly explains "HTML text box is not available read-only how to achieve", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Now let the editor to take you to learn "HTML text box is not available read-only how to achieve it!"
Method 1: not available
Method 2: read-only
Method 3: hide (but occupy position)
Method 4: hide (do not occupy the position)
Sometimes, we want the text box in the form to be read-only, so that the user cannot modify the information, such as the word "China". The ways of implementation can be summarized as follows.
Method 1: onfocus=this.blur ()
Copy the code
The code is as follows:
Method 2:readonly
Copy the code
The code is as follows:
Method 3: disabled
Copy the code
The code is as follows:
At this point, I believe that you have a deeper understanding of "HTML text box is not available read-only how to achieve", might as well to practical operation it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!