<form>
Conmon properties of form tags
attribute | value |
---|---|
action | specify the sending address for submitting the form |
method | specify how to send th form.value1: get. value2:post |
enctype | define the submission type |
target | specify how to open a new window |
name | define the form name |
<input>
Common properties of input tags
attribute | value |
---|---|
checked | specifies that the input element is selected when it is first loaded |
placeholder | define prompt fields to help users enter |
type | specify the type of input element |
value | define the value of the input element |
Example:
effect
code part
<form action="www.baidu.com" method="post" enctype="multipart/form-data" target="_blank" name="information form" style="width: 300px;">
<input name="use-1" placeholder="this is placeholder"><br><br>
<hr>
<input name="use-2" type="submit" value="submit"><br><br>
<hr>
<input name="use-2" type="checkbox"><br><br>
<input name="use-2" type="checkbox"><br><br>
<input name="use-2" type="checkbox"><br><br>
<hr>
<input type="button" value="button">
</form>
<select>
Common attributes and supporting tags of select tags
<option>
Drop-down option tag,which needs to be embedded in the <select>
tag to use.
attribute | value |
---|---|
name | defines the name of the select element,which is used to store the drop-down value |
size | define the number of visible items in the menu |
disabled | This option is disabled when the property is true |
multiple | specify multiple optional values |
selected | specify default drop-down items |
Example:
effect
code part
<select name="one" size="1">
<option>item 1</option>
<option>item 2</option>
</select>
<br>
<br>
<select name="two" size="2">
<option>item 1</option>
<option>item 2</option>
</select>
<button>
Tag
document or image class content can be placed in the button element and has the submission function of sunbmit.this is the difference between this element and the button created by the input element.