-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zh-cn: Format /web/html using Prettier
- Loading branch information
1 parent
881e54e
commit 7f58e13
Showing
122 changed files
with
1,400 additions
and
1,078 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,10 +23,10 @@ original_slug: Web/Guide/HTML/Constraint_validation | |
|
||
[`type`](/zh-CN/docs/Web/HTML/Element/input#type) 属性中的固有约束有: | ||
|
||
| Input 类型 | 约束描述 | 相关违约 | | ||
| ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | | ||
| [`<input type="URL">`](/zh-CN/docs/Web/HTML/Element/input/url) | 值必须为 [URL 现行标准](https://url.spec.whatwg.org/)定义的绝对 [URL](/zh-CN/docs/Learn/Common_questions/What_is_a_URL) 地址。 | **[TypeMismatch](/zh-CN/docs/Web/API/ValidityState/typeMismatch)** 约束违反 | | ||
| [`<input type="email">`](/zh-CN/docs/Web/HTML/Element/input/email) | 该值必须是一个语法上有效的电子邮件地址,其格式一般为 `[email protected]`,但也可以是本地的,如 `username@hostname`。 | **[TypeMismatch](/zh-CN/docs/Web/API/ValidityState/typeMismatch)** 约束违反 | | ||
| Input 类型 | 约束描述 | 相关违约 | | ||
| ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------- | | ||
| [`<input type="URL">`](/zh-CN/docs/Web/HTML/Element/input/url) | 值必须为 [URL 现行标准](https://url.spec.whatwg.org/)定义的绝对 [URL](/zh-CN/docs/Learn/Common_questions/What_is_a_URL) 地址。 | **[TypeMismatch](/zh-CN/docs/Web/API/ValidityState/typeMismatch)** 约束违反 | | ||
| [`<input type="email">`](/zh-CN/docs/Web/HTML/Element/input/email) | 该值必须是一个语法上有效的电子邮件地址,其格式一般为 `[email protected]`,但也可以是本地的,如 `username@hostname`。 | **[TypeMismatch](/zh-CN/docs/Web/API/ValidityState/typeMismatch)** 约束违反 | | ||
|
||
对于这两种输入类型,如果设置了 [`multiple`](/zh-CN/docs/Web/HTML/Element/input#multiple) 属性,可以设置几个值,作为一个逗号分隔的列表。如果其中任何一个不满足这里描述的条件,就会触发 **TypeMismatch** 约束的违反。 | ||
|
||
|
@@ -251,6 +251,7 @@ original_slug: Web/Guide/HTML/Constraint_validation | |
- 通过提交表单本身。 | ||
|
||
调用 `checkValidity()` 也被称为约束的*静态*验证,调用 `reportValidity()` 也被称为约束的*交互*认证。 | ||
|
||
> **备注:** | ||
> | ||
> - 如果 {{ HTMLElement("form") }} 元素上设置了 [`novalidate`](/zh-CN/docs/Web/HTML/Element/form#novalidate) 属性,则不发生约束验证交互。 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,17 +57,17 @@ slug: Web/HTML/Element/address | |
这个例子演示了如何使用 `<address>` 表示一篇文章的作者的联系信息。 | ||
|
||
```html | ||
<address> | ||
You can contact author at <a href="http://www.somedomain.com/contact"> | ||
www.somedomain.com</a>.<br> | ||
If you see any bugs, please <a href="mailto:[email protected]"> | ||
contact webmaster</a>.<br> | ||
You may also want to visit us:<br> | ||
Mozilla Foundation<br> | ||
331 E Evelyn Ave<br> | ||
Mountain View, CA 94041<br> | ||
USA | ||
</address> | ||
<address> | ||
You can contact author at | ||
<a href="http://www.somedomain.com/contact"> www.somedomain.com</a>.<br /> | ||
If you see any bugs, please | ||
<a href="mailto:[email protected]"> contact webmaster</a>.<br /> | ||
You may also want to visit us:<br /> | ||
Mozilla Foundation<br /> | ||
331 E Evelyn Ave<br /> | ||
Mountain View, CA 94041<br /> | ||
USA | ||
</address> | ||
``` | ||
|
||
### 结果 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.