CSS Form Properties

Source: Internet
Author: User

In general, forms are essential in a single page, and here's my summary of my knowledge of the form:

Table element , form Properties , and form submission (JS knowledge) in turn

1. Form elements:

  <form action= "Submit the location//not write the words will be submitted to itself" method= "How to send form data" ></form>

Elements within a form:

1)DataList(Data list)

2)keygen(Generate encrypted string)

3)output (output result)

4)meter(measuring device)

2. Form properties:

1)Palceholder: Please enter the user name when the user enters the text, the content within the placeholder disappears

2)Autofocus: Automatically get focus

3)multiple: Multi-file transfer, using in file

4)autocomplete= "on": Automatically replenish remaining content

5)novalidate: Turn off authentication

6)required: Required fields

7)pattern: Custom Validation (pattern= "\d") requires input number, capital D is

3, form submission verification:

Onsubmit= "return function ()"

code example:

    functionCheckform () {//get the value of an email        varemail = document.getElementById ("email")). Value; if(Email = = ""){            return false; }Else if(Email.indexof ("@") ==-1){            return false; }Else{            return true; }    }

Note: If you want to verify the account and verify the password, you need to write Retrun true again.

CSS Form Properties

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.