老师检查作业,谢谢!

来源:2-7 编程练习

weixin_慕少0270060

2021-10-17 21:33:12

<!doctype html>
<html>
<head>
    <meta charset="UTF-8" />
<title></title>
</head>
<body>
<!--此处填写代码-->
<form action =" " method="post">
    <label>
        性别:
        男<input type ="radio" name="unisex">
    </label> 
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <label>
        女<input type ="radio" name="unisex">
    </label>
    <p>
        我喜欢大的水果:
    </p>   
        <p>
            <label>
            <input type="checkbox" name="fruits">苹果
            </label>
        </p>
        <p>
            <label>
            <input type="checkbox" name="fruits">梨子
            </label>
        </p>
        <p>
            <label>
            <input type="checkbox" name="fruits">桃子
            </label>
        </p>
</form>
</body>
</html>


写回答

1回答

好帮手慕然然

2021-10-18

同学你好,代码实现基本没问题,建议优化:点击“性别”两字的时候也会选中“男单选按钮”,建议将性别”两字放到<label>标签外面,如下

https://img.mukewang.com/climg/616cd54809433c7210000524.jpg

祝学习愉快!

0

0 学习 · 17877 问题

查看课程