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
Before reading this article, I hope you have a ba...
Table of contents 1. Overview 2. Use docker to de...
Now if you want to use the video tag in a page, y...
All content in this blog is licensed under Creati...
Two ways to navigate the page Declarative navigat...
Use the vscode editor to create a vue template, s...
>1 Start the database In the cmd command windo...
In the previous article, we introduced: MySQL8.0....
Table of contents Overview How to achieve it Spec...
Preface In the actual use of the database, we oft...
Table of contents Vue routing relative path jump ...
Table of contents 1. v-if 2. Use v-if on <temp...
I call this kind of bug a typical "Hamlet&qu...
We better start paying attention, because HTML Po...
A dynamic clock demo based on Canvas is provided ...