编辑下面的代码:【加编码】
<html> <body> <p>The label for the first radio button is outside the form, but still a part of the form. Try clicking the text label to toggle the male radio button.</p> <form action="demo_form.php" 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"><br><br> <input type="submit" value="Submit"> </form> <label for="male" form="form1">Male</label> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂