One of the most important tools used by a webmaster is to gather important information about an internet user, such as e-mail, name, address, phone or any other type of information.
Depending on the requirement, the information can also be stored in a file, you can get the information, forms register or subscription information presented in your web page, and many others
Email forms
- method - We will use the "post" method This form sends the information without inserting information without displaying the user's details.
- action - It will be used to specify the URL where the notification will be sent.
Example -
<form method="post" action="mailto:mail@gmail.com">.
Name: <input type="text" size="10" maxlength="40" name="name" /><br />
Password: <input type="password" size="10" maxlength="10" name="password" /><br />
<input type="submit" value="Send" />
</form>
Output -
Name:
Password:
Password:
Radio Buttons
- value - Specifies that in which case a user selects a certain button, only one value will be sent.
- name - decides which button set does the selected button belong to.
Example -
<form method="post" action="mailto:youremail@email.com">
<p>What type of shoes you wear ?</p>
<label>Color:</label> <br />
<input type="radio" name="color" value="dark" /> Dark <br />
<input type="radio" name="color" value="light" /> Light <br />
<label>Size:</label> <br />
<input type="radio" name="size" value="small" /> Small <br />
<input type="radio" name="size" value="average" /> Average <br />
<input type="radio" name="size" value="big" /> Big <br />
<input type="submit" value="Email Myself" />
</form>
Output -
What type of shoes you wear ?
Dark
Light
Small
Average
Big
Text fields
- type - establishes the text field's type. For example: text, sending, or password.
- name - gives the field a name for further reference at a later date.
- size - sets the size of the field.
- maxlenght - the maximum value of characters that can be typed.
Example -
<form method="post" action="mailto:youremail@email.com">
Name: <input type="text" size="10" maxlength="40" name="name" /><br />
Password: <input type="password" size="10" maxlength="10" name="password" />
</form>
Output -
Name:
Password:
Password:
0 comments:
Post a Comment