HTML form serial 7- practice

Yesterday evening because there are things that are not updated, but not too late this afternoon made, because on the same day just a matter of time only, so this evening will be updated once ado.

Exercises 1. The form, we want to create a comprehensive registration page. To use all the knowledge we learned earlier.

We sort out ideas:

First practiced enter the account password, and text attributes as a text box, the property is the password text box to enter text into the dark

Second, as the input attribute checkbox radio, the default attribute is checked select the option checked, different options are mutually exclusive values ​​to the name attribute must be equal. Checkbox input attribute checkbox.

Third, the input box textarea tag, which define the maximum number of rows rows property, most cols attribute definition column.

Fourth, the attribute value representative of a calendar date, email attribute is representative of a mailbox (must contain @), Number attribute, only numbers on behalf of the frame, attribute submit, submit the information to specify the representative system, attribute value is reset representatives resubmit information, submit and reset can also have a value attribute to define the name of this button. button attribute to the Add button.

Fifth, the transmission of information has two main points:

Name (1) form action tag property value comprises transmitting information necessary to the system

(2) the use of the name attribute to prompt what values ​​will be passed to our destination, which is a little checkbox and multiple choice section, the value passed in property value added to illustrate through. Just can not pass attribute values ​​button

Sixth, followed later in the form tag to specify the form field labels area, followed by legend title on behalf of the form.

 

 
   


 

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <title>d50&51_form_exercise</title>

</head>

<body>

<form action="www.baidu.com">

    <fieldset>

        <Legend> registration interface </ legend>

    账号:<input type="text" id="d1" name="account">

    <br>

    密码:<input type="password" id="d2" name="password">

    <br>

    性别:  <input type="radio" name="gender" value="male">男

            <input type="radio" name="gender" value="female">女

            <input type="radio" name="gender" checked="checked" value="screct">保密

    <br>

    爱好:  <input type="checkbox" checked="checked" name="hobby" value="basketball">篮球

            <input type="checkbox" name="hobby" value="message">按摩

            <input type="checkbox" name="hobby" value="run">跑步

            <input type="checkbox" name="hobby" value="bungee jumping">蹦极

            <input type="checkbox" name="hobby" value="hit on a girl">撩妹

    <br>

    Summary:

    <textarea cols="30" rows="10" name="description"></textarea>

    <br>

    生日:<input type="date" name="birthday">

    <br>

    邮箱: <input type="email" name="mail">

    <br>

    Mobile Phone: <input type = "number" name = "phoneNumber">

    <br>

    <Input type = "submit" value = "Sign up now">

    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

    <Input type = "reset" value = "Clear All Information">

    <br>

    <input type="button" value="瞎按">

        </fieldset>

</form>

</body>

</html>

Second, the source

d50&51_form_exercise

Address: https: //github.com/ruigege66/HTML_learning/blob/master/d50%2651_form_exercise

Welcome attention to micro-channel public number: Fourier transform

Guess you like

Origin www.cnblogs.com/ruigege0000/p/10991377.html