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>
required
使您的input
成为必填项 ,限制您的用户在沒填写必填项的情况下无法提交表单。请尝试在沒有在完成必填项前提交表单,看看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: