label 标签
你对什么运动感兴趣:
慢跑
登山
篮球
你对什么运动感兴趣:
慢跑
登山
篮球
2016-02-19
<form method="post" action="save.php">
<h2>你对什么运动感兴趣:</h2>
<label for="larun">慢跑</label> <input type="checkbox" name="run" id="larun" /><br />
<label for="laclimp">登山</label> <input type="checkbox" name="climp" id="laclimp" /><br />
<label for="labasketball">篮球</label> <input type="checkbox" name="basketball" id="labasketball">
</form>
<form method="post" action="save.php">
<h2>你对什么运动感兴趣:</h2><!-- label的for属性的值对应后面input的id值 -->
<label for="larun">慢跑</label> <input type="checkbox" name="run" id="larun" /><br />
<label for="laclimp">登山</label> <input type="checkbox" name="climp" id="laclimp" /><br />
<label for="labasketball">篮球</label> <input type="checkbox" name="basketball" id="labasketball">
</form>
举报