HTML Input Attributes The value attribute The value attribute specifies the initial value of the input field: <form action=""> <input type="text" name="name" value="123WORDPRESS.COM"> </form> readonly attribute The readonly attribute specifies that an input field is read-only (cannot be modified): <form action=""> <input type="text" name="name" value="123WORDPRESS.COM" readonly> </form> A readonly attribute does not require a value. It is equivalent to readonly="readonly". The disabled attribute The disabled attribute specifies that the input field is disabled; <form action=""> <input type="text" name="name" value="123WORDPRESS.COM" disabled > </form> The disabled attribute does not require a value. This is equivalent to disabled="disabled". size attribute The size attribute specifies the size of the input field in characters: <form action=""> <input type="text" name="name" value="123WORDPRESS.COM" size="40"> </form> The maxlength attribute The maxlength attribute specifies the maximum length allowed for an input field: <form action=""> <input type="text" name="name" value="123WORDPRESS.COM" maxlength="10"> </form> If the maxlength attribute is set, the input control will not accept more characters than the allowed number. The width attribute Defines the width of the input field. (Applicable to type="image"): <form action=""> <input type="image" name="img" src="xxx.jpg" width="100"> </form> height property Defines the height of the input field. (Applicable to type="image"): <form action=""> <input type="image" name="img" src="xxx.jpg" height="100"> </form> src Attribute Defines the URL of an image to be displayed in the submit button form: <form action=""> <input type="image" name="img" src="xxx.jpg" width="100"> </form> name attribute Define the name of the input element: <form action=""> <input type="image" name="img" src="xxx.jpg" width="100"> </form> The checked attribute Specifies that this input element should be selected when first loaded: <form action=""> <input type="radio" name="single choice" checked> </form> The accept attribute Specifies the type of file to be submitted via file upload: <form action=""> <input type="file" name="Upload file" accept="text/css"> </form> The above is the full content of this article. I hope that the content of this article can bring some help to your study or work. If you have any questions, you can leave a message to communicate. Thank you for your support of 123WORDPRESS.COM! |
<<: Detailed tutorial on Apache source code installation and virtual host configuration
>>: Detailed explanation of the use of various MySQL indexes
1. Install mutt sudo apt-get install mutt 2. Inst...
Preface: In MySQL, the system supports many chara...
Preface There are many ways to center horizontall...
<br />Related articles: 9 practical suggesti...
CSS3 can create animations, which can replace man...
Preface If the query information comes from multi...
Docker installation (Alibaba Cloud Server) Docker...
Table of contents Preface 1. Uninstall MySQL 2. I...
1. Environmental Preparation 1.1 Basic Environmen...
Preface When we installed the system, we did not ...
1.17.9 More delicious, really Nginx download addr...
Preface If we want to achieve the effect of onlin...
The code looks like this: .process{ border:1px so...
For novices who have just started to build a webs...
1. Concept They are all attributes of Element, in...