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
input
元素中添加required
的属性,如下所示: <input type="text" required>
input
required
字段,以便您的用户无法在不填写此字段的情况下提交表单。然后尝试提交表单而不输入任何文本。了解您的HTML5表单如何通知您该字段是必需的? input
元素应具有required
属性。
testString: 'assert($("input").prop("required"), "Your text input
element should have the required
attribute.");'
```
Click here to view more cat photos.
Things cats love:
Top 3 things cats hate: