freeCodeCamp/guide/chinese/certifications/responsive-web-design/basic-html-and-html5/create-a-set-of-checkboxes/index.md

13 lines
638 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
title: Create a Set of Checkboxes
localeTitle: 创建一组复选框
---
## 创建一组复选框
`type="checkbox"`属性基本上与`type="radio"`属性的作用相同:主要区别在于复选框用于收集一个或多个选项,当您需要独占选择(一个或另一个)时使用单选按钮。
`name`属性表示该复选框所属的组,并且作为组的一部分将更容易管理服务器端的数据。
要解决这个难题,您需要创建三个`input` HTML元素其属性为`type="checkbox"` `name`属性设置为`"personality"` (大写问题);标签的文本内容由您决定。
祝你好运!