点击查看更多猫咪图片。
猫咪最喜欢的三件东西:
- 猫薄荷
- 激光笔
- 千层饼
猫咪最讨厌的三件东西:
ordered lists(缩写 ol)
。
有序列表以<ol>
开始,中间包含一个或多个<li>
元素,最后以</ol>
结尾。
例如:
```html
ul
元素。'
testString: assert.equal($("ul").length, 1);
- text: '页面应该只有一个ol
元素。'
testString: assert.equal($("ol").length, 1);
- text: 'ul
无序列表应该包含3个li
条目。'
testString: assert.equal($("ul li").length, 3);
- text: 'ol
有序列表应该包含3个li
元素。'
testString: assert.equal($("ol li").length, 3);
- text: '确保ul
无序列表有结束标记。'
testString: assert(code.match(/<\/ul>/g) && code.match(/<\/ul>/g).length === code.match(/ol
有序列表有结束标记。'
testString: assert(code.match(/<\/ol>/g) && code.match(/<\/ol>/g).length === code.match(/li
条目都有结束标记。'
testString: assert(code.match(/<\/li>/g) && code.match(/li
元素不应该为空。'
testString: $('ul li').each((i, val) => assert(val.textContent.replace(/\s/g, '')));
- text: '有序列表里的 li
元素不应该为空。'
testString: $('ol li').each((i, val) => assert(!!val.textContent.replace(/\s/g, '')));
```
点击查看更多猫咪图片。
猫咪最喜欢的三件东西:
猫咪最讨厌的三件东西: