Note: record two new contacts-required + placeholder

Source: Internet
Author: User

 

1.1 required = "required"

 

1.2 placeholder

When the user has not entered a value, the input control may display descriptive text or prompt information to the user through placeholder, which is common on the current website and some JS frameworks provide similar functions, to put it simply, the solution commonly used in earlier versions creates a label for the input control, and then controls the location of some labels through CSS so that it overwrites the input control. When the label gets the focus, the browser will focus on the input control. However, with placeholder, the new browser has this function built in, and its feature value is displayed in the input box in a light gray style. When the input box gets the focus and has a value, the prompt information disappears automatically.

For example:

<P> <label for = "runnername"> Runner: </label> <input id = "runnername" name = "runnername" type = "text" Placeholder = "first and last name"/> </P>

 

Sorting ....

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.