--- id: bad87fee1348ce8acef08814 title: Warn Your Users of a Dangerous Action with btn-danger challengeType: 0 videoUrl: '' localeTitle: 用btn-danger警告你的危险行为用户 --- ## Description
Bootstrap带有几种预定义的按钮颜色。 btn-danger类是用于通知用户按钮执行破坏性操作的按钮颜色,例如删除猫照片。创建一个带有“删除”文本的按钮,并为其提供类btn-danger 。请注意,这些按钮仍然需要btnbtn-block类。
## Instructions
## Tests
```yml tests: - text: 创建一个带有“删除”文本的新button元素。 testString: 'assert(new RegExp("Delete","gi").test($("button").text()), "Create a new button element with the text "Delete".");' - text: 你的所有Bootstrap按钮都应该有btnbtn-block类。 testString: 'assert($("button.btn-block.btn").length > 2, "All of your Bootstrap buttons should have the btn and btn-block classes.");' - text: 你的新按钮应该有类btn-danger 。 testString: 'assert($("button").hasClass("btn-danger"), "Your new button should have the class btn-danger.");' - text: 确保所有button元素都有一个结束标记。 testString: 'assert(code.match(/<\/button>/g) && code.match(/
## Challenge Seed
```html

CatPhotoApp

Click here for cat photos.

A cute orange cat lying on its back. Three kittens running towards the camera.

Things cats love:

  • cat nip
  • laser pointers
  • lasagna

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats
```
## Solution
```js // solution required ```