10.1.2 HTML checked 属性
checked 属性 -- 使选择型的输入域(框)被选中
示例
<form
id
=
"dreamduform"
action
=
"dreamdu.php"
method
=
"post"
>
<label
for
=
"fav"
>
计算机</label>
<input
type
=
"checkbox"
value
=
"1"
id
=
"fav"
name
=
"fav"
/>
<label
for
=
"fav"
>
旅游</label>
<input
type
=
"checkbox"
value
=
"2"
id
=
"fav"
name
=
"fav"
/>
<label
for
=
"fav"
>
购物</label>
<input
type
=
"checkbox"
value
=
"3"
id
=
"fav"
name
=
"fav"
checked
=
"checked"
/>
</form>