2018-10-10 18:03:03 -04:00
---
id: bad87fee1348bd9aedf08833
2020-12-16 00:37:30 -07:00
title: 用占位符文本填充空白
2018-10-10 18:03:03 -04:00
challengeType: 0
2019-12-26 20:05:59 +08:00
videoUrl: 'https://scrimba.com/p/pVMPUv/cgR7Dc7'
forumTopicId: 18178
2021-01-13 03:31:00 +01:00
dashedName: fill-in-the-blank-with-placeholder-text
2018-10-10 18:03:03 -04:00
---
2020-12-16 00:37:30 -07:00
# --description--
2018-10-10 18:03:03 -04:00
2021-01-08 11:20:48 -08:00
Web 开发者通常用 [lorem ipsum text ](https://baike.baidu.com/item/Lorem%20ipsum/3684081 ) 来做占位符,占位符就是一些用于占位的文字,没有实际意义。
2018-10-10 18:03:03 -04:00
2021-01-08 11:20:48 -08:00
之所以叫 `lorem ipsum text` ,是因为 `lorem ipsum` 是古罗马西塞罗谚语的前两个单词。
2018-10-10 18:03:03 -04:00
2020-12-16 00:37:30 -07:00
# --instructions--
2018-10-10 18:03:03 -04:00
2021-01-08 11:20:48 -08:00
请把 `p` 元素的内容文本替换为:`Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.`
2018-10-10 18:03:03 -04:00
2020-12-16 00:37:30 -07:00
# --hints--
2018-10-10 18:03:03 -04:00
2021-01-08 11:20:48 -08:00
`p` 元素的内容文本应包含 `Kitty ipsum` 。
2018-10-10 18:03:03 -04:00
2020-12-16 00:37:30 -07:00
```js
assert.isTrue(/Kitty(\s)+ipsum/gi.test($('p').text()));
2018-10-10 18:03:03 -04:00
```
2021-01-13 03:31:00 +01:00
# --seed--
## --seed-contents--
```html
< h1 > Hello World< / h1 >
< h2 > CatPhotoApp< / h2 >
< p > Hello Paragraph< / p >
```
2020-12-16 00:37:30 -07:00
# --solutions--
2018-10-10 18:03:03 -04:00
2021-01-13 03:31:00 +01:00
```html
< h1 > Hello World< / h1 >
< h2 > CatPhotoApp< / h2 >
< p > Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff< / p >
```