atrybuty formularza HTML etykiety
Przykłady
Znajduje się w postaci formularza poza <label> element (ale nadal stanowić część formularza):
<form action="demo_form.html" id="form1">
<input type="radio" name="sex" id="male" value="male"><br>
<label for="female">Female</label>
<input type="radio" name="sex" id="female" value="female">
<input type="submit" value="提交">
</form>
<label for="male" form="form1">Male</label>
<input type="radio" name="sex" id="male" value="male"><br>
<label for="female">Female</label>
<input type="radio" name="sex" id="female" value="female">
<input type="submit" value="提交">
</form>
<label for="male" form="form1">Male</label>
Spróbuj »
Pomoc Browser
Wszystkie główne przeglądarki obsługują właściwość formularza.
Definicja i Wykorzystanie
Określa atrybut formą <label> elementów jeden lub więcej formularzy należy.
Różnice między HTML 4.01 i HTML5
Formularz jest nowy atrybut w atrybutach HTML5.
gramatyka
<label form=" form_id ">
Wartość nieruchomości
值 | 描述 |
---|---|
form_id | 规定 <label> 元素所属的一个或多个表单的 id 列表,以空格分隔。 |
HTML <label> tag