Without further ado, I will post the code for you directly. The specific code is as follows: <!--Method 1: onfocus=this.blur() When the mouse cannot be placed, it will lose focus--> <input type="text" name="input1" value="中国" onfocus=this.blur()> <!-- Method 2: readonly text will not change color and is not editable --> <input type="text" name="input1" value="中国" readonly> <input type="text" name="input1" value="中国" readonly="true"> <!-- Method 3: disabled The text will turn gray and cannot be edited. --> <input type="text" name="input1" value="中国" disabled="true"> Summarize The above is the editor's introduction to HTML to implement text box read-only and cannot modify the content. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! |
<<: Introduction to root directory expansion under Linux system
>>: A brief discussion on two methods of achieving semi-transparent background color in CSS
Table of contents 1. Scene layout 2. Add a handle...
1. Javascript returns to the previous page history...
Whether you're trying to salvage data from a ...
Table of contents 1. Limit props to type lists 2....
Must read before operation: Note: If you want to ...
1. View the detailed information of all current c...
1. Go to the official website: D:\mysql-5.7.21-wi...
This article records the detailed process of down...
Preface Since the types of the same fields in the...
When I was writing a WeChat applet project, there...
I just started learning about databases recently....
This article analyzes the consistency processing ...
At present, most people who use Linux either use ...
Only show the top border <table frame=above>...
Starting from Elasticsearch 6.8, free users are a...