diff options
Diffstat (limited to 'files/zh-cn/web/html/element/input')
4 files changed, 11 insertions, 11 deletions
diff --git a/files/zh-cn/web/html/element/input/hidden/index.html b/files/zh-cn/web/html/element/input/hidden/index.html index 7f87b5441d..a1ed459082 100644 --- a/files/zh-cn/web/html/element/input/hidden/index.html +++ b/files/zh-cn/web/html/element/input/hidden/index.html @@ -107,7 +107,7 @@ translation_of: Web/HTML/Element/input/hidden <p>隐藏输入表单还用于存储和提交安全令牌或机密信息,以提高网站的安全性。基本思路是,如果用户填写敏感表格,例如在其银行网站上将某笔款项转入另一个帐户的表格,他们将被提供的密钥和证明他们就是他们所说的真实身份,并且他们使用正确的表单来提交转移请求。</p> -<p>这将阻止恶意用户创建伪造的表单,伪装成银行,然后通过电子邮件将表单发送给毫无戒备心的用户,以诱骗他们将钱转入错误的位置。 这种攻击称为<a href="https://wiki.developer.mozilla.org/en-US/docs/Learn/Server-side/First_steps/Website_security#Cross-Site_Request_Forgery_(CSRF)">跨站点请求伪造(CSRF)</a>;几乎任何信誉良好的服务器端框架都使用隐藏机密来防止此类攻击。</p> +<p>这将阻止恶意用户创建伪造的表单,伪装成银行,然后通过电子邮件将表单发送给毫无戒备心的用户,以诱骗他们将钱转入错误的位置。 这种攻击称为<a href="/zh-CN/docs/Learn/Server-side/First_steps/Website_security#Cross-Site_Request_Forgery_(CSRF)">跨站点请求伪造(CSRF)</a>;几乎任何信誉良好的服务器端框架都使用隐藏机密来防止此类攻击。</p> <div class="note"> <p>如前所述,将密钥放置在隐藏的输入中并不能使其固有安全性。 密钥的组成和编码已经可以做到这一点。隐藏输入的值是保持它与数据关联性,并在将表单发送到服务器时自动将其包含在内。 您需要使用精心设计的密钥来真正保护您的网站。</p> diff --git a/files/zh-cn/web/html/element/input/index.html b/files/zh-cn/web/html/element/input/index.html index f0f61c5d8f..3efd79c60f 100644 --- a/files/zh-cn/web/html/element/input/index.html +++ b/files/zh-cn/web/html/element/input/index.html @@ -300,7 +300,7 @@ translation_of: Web/HTML/Element/input <table> <caption> - <p>{{htmlelement('input')}}元素的属性包括<a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes">全局HTML属性</a>和以下属性:</p> + <p>{{htmlelement('input')}}元素的属性包括<a href="/zh-CN/docs/Web/HTML/Global_attributes">全局HTML属性</a>和以下属性:</p> <table> <thead> @@ -434,12 +434,12 @@ translation_of: Web/HTML/Element/input <td>当表单控件为空时,控件中显示的内容</td> </tr> <tr> - <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly">readonly</a></td> + <td><a href="/zh-CN/docs/Web/HTML/Attributes/readonly">readonly</a></td> <td>绝大部分</td> <td>布尔值。存在时表示控件的值不可编辑</td> </tr> <tr> - <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/required">required</a></td> + <td><a href="/zh-CN/docs/Web/HTML/Attributes/required">required</a></td> <td>绝大部分</td> <td>布尔值。表示此值为必填项或者提交表单前必须先检查该值</td> </tr> @@ -556,7 +556,7 @@ translation_of: Web/HTML/Element/input </dd> <dt>{{ htmlattrdef("checked") }}</dt> <dd>如果该元素的<strong>type</strong>属性的值为<span style="font-family: courier new;">radio或者</span><span style="font-family: courier new;">checkbox</span>,则该布尔属性的存在与否表明了该控件是否是默认选择状态。 - <p>If present on a <code>checkbox</code> type, it indicates that the checkbox is checked by default (when the page loads). It does <em>not</em> indicate whether this checkbox is currently checked: if the checkbox’s state is changed, this content attribute does not reflect the change. (Only the <a href="https://wiki.developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement"><code>HTMLInputElement</code>’s <code>checked</code> IDL attribute</a> is updated.)</p> + <p>If present on a <code>checkbox</code> type, it indicates that the checkbox is checked by default (when the page loads). It does <em>not</em> indicate whether this checkbox is currently checked: if the checkbox’s state is changed, this content attribute does not reflect the change. (Only the <a href="/zh-CN/docs/Web/API/HTMLInputElement"><code>HTMLInputElement</code>’s <code>checked</code> IDL attribute</a> is updated.)</p> <div class="note"> <p><strong>Note:</strong> Unlike other input controls, a checkboxes and radio buttons value are only included in the submitted data if they are currently <code>checked</code>. If they are, the name and the value(s) of the checked controls are submitted.</p> @@ -672,7 +672,7 @@ translation_of: Web/HTML/Element/input <p>Per the specifications, the <code>list</code> attribute is not supported by the <code>hidden</code>, <code>password</code>, <code>checkbox</code>, <code>radio</code>, <code>file</code>, or any of the button types.</p> -<p>Depending on the browser, the user may see a custom color palette suggested, tic marks along a range, or even a input that opens like a select but allows for non-listed values. Check out the <a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist#Browser_compatibility">browser compatibility table</a> for the other input types.</p> +<p>Depending on the browser, the user may see a custom color palette suggested, tic marks along a range, or even a input that opens like a select but allows for non-listed values. Check out the <a href="/zh-CN/docs/Web/HTML/Element/datalist#Browser_compatibility">browser compatibility table</a> for the other input types.</p> <p>See the {{htmlelement('datalist')}} element.</p> @@ -687,7 +687,7 @@ translation_of: Web/HTML/Element/input <dd> <p>Valid for <code>text</code>, <code>search</code>, <code>url</code>, <code>tel</code>, <code>email</code>, and <code>password</code>, it defines the minimum number of characters (as UTF-16 code units) the user can enter into the entry field. This must be an non-negative integer value smaller than or equal to the value specified by <code>maxlength</code>. If no <code>minlength</code> is specified, or an invalid value is specified, the input has no minimum length.</p> - <p>The input will fail <a href="https://wiki.developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation">constraint validation</a> if the length of the text entered into the field is fewer than <code>minlength</code> UTF-16 code units long, preventing form submission. See {{anch("Client-side validation")}} for more information.</p> + <p>The input will fail <a href="/zh-CN/docs/Web/Guide/HTML/HTML5/Constraint_validation">constraint validation</a> if the length of the text entered into the field is fewer than <code>minlength</code> UTF-16 code units long, preventing form submission. See {{anch("Client-side validation")}} for more information.</p> </dd> <dt>{{ htmlattrdef("multiple") }}{{ HTMLVersionInline(5) }}</dt> <dd>This Boolean attribute indicates whether the user can enter more than one value.这个属性指示用户能否输入多个值。这个属性仅在<strong>type</strong>属性为email或file的时候生效 ; 否则被忽视.</dd> @@ -820,7 +820,7 @@ translation_of: Web/HTML/Element/input </tr> <tr> <td><a href="/en-US/docs/Web/CSS/:placeholder-shown" title="The :placeholder-shown CSS pseudo-class represents any <input> or <textarea> element that is currently displaying placeholder text."><code>:placeholder-shown</code></a></td> - <td>Element that is currently displaying <a class="external" href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-placeholder" rel="noopener">placeholder text</a>, including input elements with the <a href="#htmlattrdefplaceholder">placeholder</a> attribute present that has, as of yet, no value.</td> + <td>Element that is currently displaying <a class="external" href="/zh-CN/docs/Web/HTML/Element/input#attr-placeholder" rel="noopener">placeholder text</a>, including input elements with the <a href="#htmlattrdefplaceholder">placeholder</a> attribute present that has, as of yet, no value.</td> </tr> <tr> <td><a href="/en-US/docs/Web/CSS/:default" title="The :default CSS pseudo-class selects form elements that are the default in a group of related elements."><code>:default</code></a></td> diff --git a/files/zh-cn/web/html/element/input/reset/index.html b/files/zh-cn/web/html/element/input/reset/index.html index 5af6fbd48b..e24d084a31 100644 --- a/files/zh-cn/web/html/element/input/reset/index.html +++ b/files/zh-cn/web/html/element/input/reset/index.html @@ -19,7 +19,7 @@ translation_of: Web/HTML/Element/input/reset <p class="hidden">该交互式示例的源代码存储在GitHub存储库中。 如果您想为交互式示例项目做出贡献,请克隆 <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a>,并发起拉取请求。</p> <div class="note"> -<p>您通常应该尽量避免在表单中包含重置按钮。 它们很少有实用性,事实上更有可能使用户误点而感到沮丧(通常是在尝试单击“<a href="https://wiki.developer.mozilla.org/zh-CN/docs/Web/HTML/Element/Input/submit">提交</a>”按钮时)。</p> +<p>您通常应该尽量避免在表单中包含重置按钮。 它们很少有实用性,事实上更有可能使用户误点而感到沮丧(通常是在尝试单击“<a href="/zh-CN/docs/Web/HTML/Element/Input/submit">提交</a>”按钮时)。</p> </div> <table class="properties"> @@ -67,7 +67,7 @@ translation_of: Web/HTML/Element/input/reset <h2 id="使用重置按钮">使用重置按钮</h2> -<p><code><input type =“ reset”></code> 按钮用于重置表单。 如果您要创建自定义按钮,则使用JavaScript自定义行为,您需要使用 <code><a href="https://wiki.developer.mozilla.org/zh-CN/docs/Web/HTML/Element/Input/button"><input type="button"></a></code>,或者最好使用 <code>{{htmlelement("button")}}</code> 元素。</p> +<p><code><input type =“ reset”></code> 按钮用于重置表单。 如果您要创建自定义按钮,则使用JavaScript自定义行为,您需要使用 <code><a href="/zh-CN/docs/Web/HTML/Element/Input/button"><input type="button"></a></code>,或者最好使用 <code>{{htmlelement("button")}}</code> 元素。</p> <h3 id="一个简单的重置按钮">一个简单的重置按钮</h3> diff --git a/files/zh-cn/web/html/element/input/search/index.html b/files/zh-cn/web/html/element/input/search/index.html index 800971c9c1..64afa2ba8d 100644 --- a/files/zh-cn/web/html/element/input/search/index.html +++ b/files/zh-cn/web/html/element/input/search/index.html @@ -469,5 +469,5 @@ input:valid ~ span:after { <li><a href="/en-US/docs/Learn/HTML/Forms">HTML 表单</a></li> <li>{{HTMLElement("input")}} 及其所基于的接口 {{domxref("HTMLInputElement")}} </li> <li><code><a href="/en-US/docs/Web/HTML/Element/input/text"><input type="text"></a></code></li> - <li><a href="https://wiki.developer.mozilla.org/en-US/docs/Learn/HTML/Forms/Property_compatibility_table_for_form_widgets">CSS 属性的兼容性</a></li> + <li><a href="/zh-CN/docs/Learn/HTML/Forms/Property_compatibility_table_for_form_widgets">CSS 属性的兼容性</a></li> </ul> |