label匹配几种不同类型的input书写方式
2017-12-16 本文已影响9人
matrix_kwok
1 <label for="first_name">First name</label>
<input id="first_name" type="text">
2 <label>
<input type="checkbox" checked> I agree to the terms
</label>
3 <label>Marital status</label>
<label>
<input type="radio" name="status">
Single
</label>
<label>
<input type="radio" name="status">
Married
</label>
<label>
<input type="radio" name="status">
Divorced
</label>
<label>
<input type="radio" name="status">
Widowed
</label>