Click here to view more cat photos.
Things cats love:
- cat nip
- laser pointers
- lasagna
Top 3 things cats hate:
- flea treatment
- thunder
- other cats
checkboxes
来表示可能有多个答案的问题。复选框是一种类型的input
您的每一个复选框可以嵌套自身的内label
元素。通过将input
元素包装在label
元素内部,它将自动将复选框输入与其周围的标签元素相关联。所有相关的复选框输入应具有相同的name
属性。通过在label
元素上设置for
属性以匹配关联input
元素的id
属性,最佳做法是明确定义复选框input
与其对应label
之间的关系。这是一个复选框的示例: <label for="loving"><input id="loving" type="checkbox" name="personality"> Loving</label>
label
元素中。这三者都应该分享personality
的name
属性。 label
元素中。
testString: 'assert($("label > input[type="checkbox"]:only-child").length > 2, "Each of your three checkbox elements should be nested in its own label
element.");'
- text: 确保每个label
元素都有一个结束标记。
testString: 'assert(code.match(/<\/label>/g) && code.match(/Click here to view more cat photos.
Things cats love:
Top 3 things cats hate: