HTML form is used to collect user input;
Form element defines the HTML form.
<FORM> Form Elements </form>Action attribute
The action definition of the action attribute is performed when submitting the form.
The usual way to submit a form to the server is to use the submission button.
Generally, the form is submitted to the webpage on the web server.
If the action attribute is omitted, the action will be set to the current page
Method attributeThe METHOD attribute specifies the HTTP method (GET or Post) used when submitting a form:: Get or Post):
When to use Get?You can use get (default method):
If the form submission is passive (such as search engine query) and there is no sensitive information.
When you use Get, the form data is visible in the page address bar: action.jsp? Name = xxxx & sex = female
*PS: GET is most suitable for the submission of a small amount of data. The browser sets the capacity limit.
When to use POST?You should use post:
If the form is updating the data, or contains sensitive information (such as a password).
POST's security is even more secure, because the data submitted in the page address bar is not visible.
HTML form contains table unit elementsThe table element refers to different types of INPUT elements, check boxes, single -selection buttons, submission buttons, text domains, etc.
<input> element
<input> element is the most important table element.
<input> There are many forms of elements, depending on different Type attributes.
-S text input: Type = Text
<FORM> <Label> Username </Label> <input Type = Text name => </form>
-Plip button: Type = submit (define the button to submit the form data to the form processing program of the form processing program)
<FORM ACTION = ACTION.JSP> <input Type = Submit Value = Submit> </Form>/*and Action. Two words*/
-Selection: Type = RADIO
<FORM> <Label> Gender </Label> <input Type = Radio Name = SEX Value = Male Checked> Male <br> <<input Type = Radio name = Sex Value> Female </Form>/* in Name When the value is consistent, you can achieve the effect of a single selection*//*Checked is the selected state or you can write it as checkd = checked*/
-Fotering: Type = Checkbox
<FORM> <Label> Hobbies </label> <input type = Checkbox name = very value = sports> <Label> Movement </label> <br> <input type = Checkbox name = Vehicle Value = Beauty> <La> bel> Beauty </label> </form>/*Checked is selected and can be written as checked = checked*/
-D definition button: Type = Button
<FORM> <input Type = Button Onclick = Alert ('Welcome to VEVB Wulin.com!') Value = click me! > </form>/*is also an ordinary button*/
-Footing list: <select> element
<FORM> <select Name = Cars> <Option Value = VOLVO> Volvo </option> <option value = Saab> Saab </option> <option value = Fiat> Fiat </Option> <Option Value = AUDI> Audi < /Option> </Select> </Form> <Option> The options to be selected for elements are defined. The list usually shows the first option as the selection. You can define the predetermined options by adding the SELECTED attribute.
-Sto text domain: <textarea> element (define multi -line input field)
<FORM> <textarea name = Message rows = 10 cols = 30> Enter the content here! </textarea>
-Press: <Button> Elements
<FORM> <Button Type = Button Onclick = Alert ('Welcome to VEVB Wulin.com!')> Click! </Button>
The above is all the contents of this article. I hope the content of this article will help everyone's learning or work ~ If you have any questions, you can leave a message to communicate. Thank you for your support for VEVB Wulin.com!