Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use color Color Picker of input in html5

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces the html5 in input color color picker how to use the relevant knowledge, the content is detailed and easy to understand, the operation is simple and fast, has a certain reference value, I believe you read this html5 input color color picker how to use the article will have a harvest, let's take a look at it.

Definition and usage

The type attribute specifies the type of input element.

Note: this property is not required, but we think you should always use it.

Color picker document.querySelector ("# color"). Onchange = function () {document.getElementById ('color'). Click (); / / the click event must be added or the color change document.body.style.background = this.value;} cannot be triggered by clicking the OK button.

Let's take a look at the HTML 5 type property

Attribute value

The value describes the button definition clickable buttons (mostly used with JavaScript to start the script) the checkbox definition check box. Color defines the color picker. Date definition date field (with calendar control) datetime definition date field (with calendar and time controls) datetime-local definition date field (with calendar and time controls) month definition date field month (with calendar control) week definition date field week (with calendar control) time definition date field hours, minutes, seconds (with time control) email definition text field for e-mail address file definition input field and "browse." Button for file upload hidden definition hidden input field image definition image as submit button number definition numeric field with spinner control password definition password field. The characters in the field are obscured. Radio defines radio buttons. Range defines a numeric field with a slider control. Reset defines the reset button. The reset button resets all form fields to their original values. Search defines the text field used for the search. Submit defines the submit button. The submit button sends data to the server. Tel defines the text field used for phone numbers. Text defaults. Defines a single-line input field in which the user can enter text. The default is 20 characters. Url defines the text field used for URL.

This is the end of the article on "how to use the color Color Picker of input in html5". Thank you for reading! I believe that everyone has a certain understanding of the knowledge of "how to use the color color picker of input in html5". If you want to learn more knowledge, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report