Review the HTML form (form) Label

table of Contents

Section title

Form part

action properties

method property

Form part of

table label

input label

select tag

type attribute of input tag

onclick event properties


This is what I found on the Internet section of the source code, I use this example to analyze the form of learned before the HTML form systematic review

First of all can be seen in three parts: the title, forms and tables. Let us first take apart one by one analysis:

Section title

This is a web page title, there are six (h1 ~ h6) can be defined in the HTML title

As can be seen from the figure, from h1 ~ h6 to smaller font. We look at this page, we use the h1 tag

Form part

Introducing the
<form> tag is used as a user input to create a form HTML
form can comprise input elements, such as text fields, check boxes, buttons, etc. submit
forms can also comprise menus, textarea, fieldset, legend label element and
forms for the server to transmit data


Tips and notes
    form element is a block element which produces longitudinal fold line
in the following analysis, I will be introduced based on the use, for the introduction in which lines of code for the number of I according to:


In line 9, we will use the <form> Now use the <form> We will use the following attributes, here I was under to analyze the online search to the
     <form action = "" method = "">

action properties

Inside the action attribute is predetermined single submit the form, where to send the data to a form
action definition and use:
  the action attribute sets or returns the form's action,
  the action attribute defines when the form is submitted the data is sent where the
syntax:

  formObject.action=URL

Address can be an absolute address or a relative address.
When the action is not set or empty, the default specified address of the current page is located, and submit data to the current page.

method property

method attribute specifies how to send the form data (form data is sent to the page specified action attribute).
Form data may be variable as a URL (method = "get") or HTTP post (method = "post" ) way to send.
Which get and post methods, they have no difference, if you want specific knowledge, can be seen with reference to the website address


Form part of

Here label began to form encapsulated data, we need to table tags for layout, use the basic table:

table label

Definition and Usage
<table> tag defines an HTML table.
Simple HTML table by the table and one or more elements tr, th and td elements.
tr element defines a table row, th head element definition table, td elements defining cell.
More complex HTML table may also include caption, col, colgroup, thead, tfoot and tbody elements.

Here it is the same page with us, and in the <table> tag which is the use of the property

By using these properties and show that we can quickly analyze the use of the basic framework and elements of our website

In it applied to the input label

input label

Definition and Usage
<input> tag is used to collect user information.
Depending on the value of the type attribute input field has many forms.
       Input fields can be text fields, check boxes, text control after the mask, radio buttons, buttons, etc.

You can learn by its properties:
the INPUT type text, means that text is the text fields can write text
name: define the name of the element input.
value: specified value input elements.
placeholder: provisions to help users fill prompted to enter the field.

This type of modification is part of the type of input label text field changes from the previous cell button (Radio)
the checked properties the predetermined value is selected to be loaded during this first input element

And it is different:

Here chekbox input type, belonging to the check box, there is a radio button, a checkbox is

The next age, is not the same

Here we used the maximum and minimum values, can set their own interest

 

This uses a simple drop-down list

select tag

Definition and Usage
select elements can create single or multiple select menu.
<select &> element in the <option> tag is used to define the list of available options.
Tips and Notes:
       Tip: select a form control element, can be used to accept user input in the form.

In web production, may use multiple input type attribute tags

type attribute of input tag

Definition and usage
type attribute specified input element.

These are the type used different types

Which adds a onclick event attribute

onclick event properties

Definition and use
the onclick attribute triggered by a mouse click on the element.
Notes:
onclick attribute does not apply the following elements:
         <Base>, <BDO>, <br>, <head>, <HTML>, <iframes.>
          <Meta>, <param>, <Script>, <style>, <title >

Of which the alert () refers to eject from the window, use many times in JavaScript

Reference website:
Code to: https://www.cnblogs.com/wangenxian/p/10927205.html
H Tags: https://www.w3school.com.cn/tags/tag_hn.asp
form tag: https: // www.w3school.com.cn/tags/tag_form.asp
Action attribute: https://zhidao.baidu.com/question/553981919814377932.html
Method, properties: https://www.w3school.com.cn/tags/att_form_method. ASP
the Table tags: https://mp.csdn.net/console/editor/html/104434824
the INPUT tag: https://www.w3school.com.cn/tags/tag_input.asp
the SELECT tag: https: // www. w3school.com.cn/tags/tag_select.asp
of the type property of input labels: https://www.w3school.com.cn/tags/att_input_type.asp
                                   https://blog.csdn.net/dayexiaofan/article/details/ 86,464,386
onclick event properties: https://www.w3school.com.cn/tags/event_onclick.asp
in table form tag and label the difference between HTML5:  
                    https://www.cnblogs.com/curedfisher/p/11608592.html

Published 32 original articles · won praise 11 · views 6175

Guess you like

Origin blog.csdn.net/Cai1010110/article/details/104434824