Method 1: <input id= File1 type= text disabled/> Not available
Method 2: <input id= File1 type= text readonly/> Read only
Method 3: <input id= File1 type= text style=display:none/> Hide (but occupying position)
Method 4: <input id= File1 type= text style=visibility:hidden/> Hide (does not take up any position)
Sometimes, we hope that the text box in the form is read-only, so that the user cannot modify the information in it. For example, the content of <input type=text name=input1 value=China> cannot be modified. To summarize the implementation methods, there are several types.
Method 1: onfocus=this.blur()
Copy the code