Method 1: <input id= "File1" type= "text" disabled/> Unavailable Method 2: <input id= "File1" type= "text" readonly/> Read-only Method 3: <input id= "File1" type= "text" style="display:none"/> Hidden (but takes up space) Method 4: <input id="File1" type="text" style="visibility:hidden"/> hidden (does not take up space) Sometimes, we want the text boxes in the form to be read-only so that users cannot modify the information in them, such as making the content of <input type="text" name="input1" value="中国">, the word "中国" cannot be modified. To summarize, there are several ways to implement it. Method 1: onfocus=this.blur() Copy code The code is as follows:<input type="text" name="input1" value="中国" onfocus=this.blur()> Method 2: readonly Copy code The code is as follows:<input type="text" name="input1" value="中国" readonly> <input type="text" name="input1" value="中国" readonly="true"> Method 3: disabled Copy code The code is as follows:<input type="text" name="input1" value="中国" disabled> |
<<: MySQL Query Cache Graphical Explanation
>>: Analysis of the problem of deploying vue project and configuring proxy in Nginx
MySQL 8.0.20 installation and configuration super...
MySQL8.0.22 installation and configuration (super...
This article example shares the specific code of ...
One time we talked about the dice rolling game. A...
Hello everyone, today I will share with you the i...
1. When designing a web page, determining the widt...
Many people use Linux Homebrew. Here are three ti...
Code <div class="test"> <div&g...
Table of contents introduction Ideas Establish ID...
<frameset></frameset> is familiar to e...
1. Absolute path First of all, on the local compu...
JavaScript - Principles Series In daily developme...
HTML img tag: defines an image to be introduced in...
Preface This article mainly introduces the releva...
1. If the user has the create routine permission,...