源代码
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>编程字典</title> </head> <body> <p>点击其中一个去排除其他选择:</p> <form action="demo_form.php"> <label for="male">男</label> <input type="radio" name="gender" id="male" value="male"><br> <label for="female">女</label> <input type="radio" name="gender" id="female" value="female"><br> <label for="other">其他</label> <input type="radio" name="gender" id="other" value="other"><br><br> <input type="submit" value="提交"> </form> </body> </html>
运行结果