Html basics-from form (5), html basics-from Form

Source: Internet
Author: User

Html basics-from form (5), html basics-from Form
1. form

Form submission:
<Form action = "" method = ""> </form> methad has two submission methods: get (not secure) and post (secure)

Text Box:
<Form> attribute value: name = (name) size = (visible characters are displayed in the input box, that is, up to a few characters can be seen)
<Input type = "text" size = ""> value = (pre-defined content in the text box) align = (align (available only for image ])
</Form> maxlength = (maximum number of characters can be entered in a text box) text = (plaintext)

Password box: property value: password = (displayed in secret)
<Input type = "password">

Single choice:
<Input type = "radio" name = ""> Note: Only one of the two names is selected if the same names are selected. Otherwise, it is useless.
Attribute Value: checked = "checked" default (which one will be selected if you want to add "checked" by default)

Check: property value: checkbox = (check)
<Input type = "checkbox" name = "">

Upload button: property value: file = (upload button)
<Input type = "file">

Reset property value: reste = (reset)
<Input type = "reste" value = "reset">

Submit attribute value: submit = (submit)
<Input type = "submit" value = "submit">

Common button (Custom button) Attribute Value: button = (Common button, Custom button)
<Input type = "button" value = "button">

Image button property value; image = (image button)
<Input type = "image" src = "image path">


Text Field: attribute value: cols = (width) rows = (height)
<Textarea cols = "Number" rows = "Number"> Enter Text </textarea> rows = (high)


Drop-down list box:
<Select> selected = selected by default
<Option> </option>
</Select>

Code (You may also find that only the drop-down box is different. The rest is that the post-type nominal value is different, but I still write a single sequence. Of course he is special. We can see that only one of the values behind the name is not required to be selected for multiple single queues. The values following the name must be the same between the check boxes, and the values following the names are random. You must also see the attributes behind them. You can try them and remember them by yourself)
<Html> Effect

The beginning of the html is almost the same. If you think about it later, you can rewrite it and start various css styles tomorrow to make your page beautiful.

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.