diff options
author | Peter Bengtsson <mail@peterbe.com> | 2021-07-16 16:27:00 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-17 04:27:00 +0800 |
commit | b9afb23d12dcae1e09f8d04c72143c5ddaa34aea (patch) | |
tree | f6c20844119bcaf0131ad4a037e0245577927f2c /files/zh-cn/orphaned/learn | |
parent | 1aa671566c3a990ec2df9a46137471d624b6f7ff (diff) | |
download | translated-content-b9afb23d12dcae1e09f8d04c72143c5ddaa34aea.tar.gz translated-content-b9afb23d12dcae1e09f8d04c72143c5ddaa34aea.tar.bz2 translated-content-b9afb23d12dcae1e09f8d04c72143c5ddaa34aea.zip |
delete conflicting/orphaned docs (zh-CN) (#1412)
* delete conflicting docs (zh-CN)
* and redirects
* do orphaned as well
* fix
* remove more orphans
* revert orphaned docs that can identify origin
* move orphaned docs to current loc
* adjust slug path
* fix redirect change from rebase
Co-authored-by: Irvin <irvinfly@gmail.com>
Diffstat (limited to 'files/zh-cn/orphaned/learn')
4 files changed, 0 insertions, 518 deletions
diff --git a/files/zh-cn/orphaned/learn/how_to_contribute/index.html b/files/zh-cn/orphaned/learn/how_to_contribute/index.html deleted file mode 100644 index 6b36cfc838..0000000000 --- a/files/zh-cn/orphaned/learn/how_to_contribute/index.html +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: 如何向MDN的学习区做贡献 -slug: orphaned/Learn/How_to_contribute -tags: - - MDN 元信息 - - 初学者 - - 学习 - - 引导 - - 指南 - - 文档 - - 贡献 -translation_of: Learn/How_to_contribute -original_slug: learn/How_to_contribute ---- -<div>{{LearnSidebar}}</div> - -<p>可能您是第一次看到这个页面,也可能您经过层层搜索而来。我们猜测您找到这里,是希望向 MDN 学习区做贡献——棒极了!</p> - -<p><span class="seoSummary">这篇文档将告诉您如何提高 MDN 学习区资料的质量。您可以做的事情各种各样,取决于您有多少时间,以及您的身份:<a href="/zh_CN/Learn/How_to_contribute#I'm_a_beginner">初学者</a>、<a href="/zh_CN/Learn/How_to_contribute#I'm_a_web_developer">Web 开发者</a>,还是<a href="/zh_CN/Learn/How_to_contribute#I'm_a_teacher">教师</a>。</span></p> - -<div class="note"> -<p><strong>注意</strong>:这篇指南会告诉您<a href="/zh-CN/docs/MDN/Contribute/Howto/Write_an_article_to_help_learn_about_the_Web">如何撰写文章来帮助他人学习 Web</a>。</p> -</div> - -<h2 id="寻找特定任务">寻找特定任务</h2> - -<p><strong>贡献者向学习区做出贡献的方法通常是阅读文章、修复排版错误并提出改进。我们同时欢迎您向我们的 <a href="https://github.com/mdn/learning-area/">GitHub 源 </a>添加示例。若您还想了解需要做的其他事项,请与我们联系。</strong></p> - -<p>在学习新知识的同时做出贡献是一件乐趣无穷的事。如果您感到迷茫或者有疑问,不用犹豫,通过<a href="/zh-CN/docs/MDN/Community#Join_our_mailing_lists">邮件列表</a>或 <a href="/zh-CN/docs/MDN/Community#Get_into_IRC">IRC 频道</a>联系我们(本页底部有更详细的信息)。<a href="/en-US/profiles/chrisdavidmills">Chris Mills</a> 是学习区的主题发布人——您也可以直接和他联系。</p> - -<p>以下章节为您的任务提供概要思路。</p> - -<h2 id="我是初学者">我是初学者</h2> - -<p>好极了!对于创建学习资源和提供反馈,初学者们至关重要。作为目标受众,您对这些文章具有独特的视角,这让您成为我们团队中的无价之宝。真的,如果您正在通过某篇文章学习知识却卡住了,或者您觉得这篇文章看起来有点令人费解,您既可以自行改正,也可以把问题告诉我们以便我们去改正它。</p> - -<p>下面是几种建议的贡献方式:</p> - -<dl> - <dt><a href="/zh-CN/docs/MDN/Contribute/Howto/Tag">为文章添加标签</a>(<em>5 分钟</em>)</dt> - <dd>为文章添加标签是最简单的贡献方式。利用标签来呈现信息是我们的特色之一,因此添加标签对我们来说是非常有价值的贡献方式。您可以先从还没有标签的<a href="/zh-CN/docs/MDN/Doc_status/Glossary#No_tags">词汇条目</a>和<a href="/zh-CN/docs/MDN/Doc_status/Learn#No_tags">学习文章</a>开始。</dd> - <dt><a href="/zh_CN/docs/Glossary">阅读并复核词汇条目</a>(<em>5 分钟</em>)</dt> - <dd>我们希望,作为初学者的您能用您的视角来审视我们所写的内容。如果您感到某个词汇条目难以理解,这说明该条目需要改进。您可以做任何觉得有必要的修改。如果您感到自己的技能不足以修改词汇条目,也可以通过<a href="/zh-CN/docs/MDN/Community#Join_our_mailing_lists">邮件列表</a>告诉我们。</dd> - <dt><a href="/zh-CN/docs/MDN/Contribute/Howto/Write_a_new_entry_in_the_Glossary">撰写词汇条目</a>(<em>20 分钟</em>)</dt> - <dd>这是学习新知识的最有效的方式了。挑选一个想要深入了解的概念,根据您所学的,撰写关于这个概念的词汇条目。“向他人解释”,这是巩固已学知识的最佳方式之一,既帮助您深入理解,同时也帮助了他人。这就是共赢!</dd> - <dt><a href="/zh_CN/docs/Learn/Index">阅读并复核学习文章</a>(<em>2 小时</em>)</dt> - <dd>这与上述“复核词汇条目”非常类似,只是由于文章更长,因此要花更多时间。</dd> -</dl> - -<h2 id="我是_Web_开发者">我是 Web 开发者</h2> - -<p>太棒了!我们太需要您的专业技能了,这确保我们向初学者提供的内容技术准确。考虑到这部分内容用于供他人学习,我们希望您提供的解释尽可能表述简单,但又不至于无用。我们首先考虑易于理解,而非过度精确。</p> - -<dl> - <dt><a href="/zh_CN/docs/Glossary">阅读并复核词汇条目</a>(<em>5 分钟</em>)</dt> - <dd>我们希望作为 Web 开发者的您,能让我们的文章内容技术准确而又不至于太学究气息。您可以做任何认为有必要的修改。如果您想在编辑前讨论内容,可以通过<a href="/zh-CN/docs/MDN/Community#Join_our_mailing_lists">邮件列表</a>或 <a href="/zh-CN/docs/MDN/Community#Get_into_IRC">IRC 频道</a>联系我们。</dd> - <dt><a href="/zh_CN/docs/MDN/Contribute/Howto/Write_a_new_entry_in_the_Glossary">撰写词汇条目</a>(<em>20 分钟</em>)</dt> - <dd>阐述技术词汇是一种很好的学习方法,它能帮助您用准确而简单的方式把握技术细节。初学者非常需要准确清晰的术语定义。我们有许多<a href="/zh-CN/docs/Glossary#Contribute">缺乏定义的术语</a>需要您来完善,请放手去做吧!</dd> - <dt><a href="/zh-CN/Learn/Index">阅读并复核学习文章</a> (<em>2 小时</em>)</dt> - <dd>这与上述“复核词汇条目”一样,只是由于文章更长,因此要花更多时间。</dd> - <dt><a href="/zh-CN/docs/MDN/Contribute/Howto/Write_an_article_to_help_learn_about_the_Web">撰写学习文章</a> (<em>4 小时或者更多</em>)</dt> - <dd>MDN 缺少朴素直白的文章以介绍如何使用 Web 技术(<a href="/zh-CN/docs/Learn/CSS">HTML</a>、<a href="/zh-CN/docs/Learn/CSS">CSS</a>、<a href="/zh-CN/docs/Learn/JavaScript">JavaScript</a> 等等)。我们还有很多陈旧的文档内容,需要复核或重构。发挥您的聪明才智,造福 Web 技术初学者吧!</dd> - <dt><a href="/zh-CN/docs/MDN/Contribute/Howto/Create_an_interactive_exercise_to_help_learning_the_web">创建练习、代码样例或交互式学习工具</a> (<em>? 小时</em>)</dt> - <dd>亲自实践的学习效果更佳,因此我们希望所有的学习文章都包含“主动学习 (active learning)”材料,比如练习、或者交互式内容。这些材料能够帮助用户熟练运用文章中详述的概念。制作“主动学习”材料的方式很多,比如使用 <a href="http://jsfiddle.net" rel="external">JSFiddle</a> 或类似工具创建代码样例,或者使用 <a href="https://thimble.mozilla.org/" rel="external">Thimble</a> 构建可解析的交互式内容。总而言之,释放您的创造力吧!</dd> -</dl> - -<h2 id="我是教师">我是教师</h2> - -<p>MDN 长期以来都拥有卓越的技术,但对于传授知识的最佳方法,我们仍然缺乏深刻的见解。我们需要教育工作者的参与,从而确保我们的材料为读者提供良好而实用的教育方法。</p> - -<dl> - <dt><a href="/zh-CN/docs/Glossary">阅读并复核词汇条目</a> (<em>15 分钟</em>)</dt> - <dd>检查词汇条目,并对任何您认为有必要的地方进行修改。如果您想在编辑前讨论内容,可以通过可以通过<a href="/zh-CN/docs/MDN/Community#Join_our_mailing_lists">邮件列表</a>或 <a href="/zh-CN/docs/MDN/Community#Get_into_IRC">IRC 频道</a>联系我们。</dd> - <dt><a href="/zh-CN/docs/MDN/Contribute/Howto/Write_a_new_entry_in_the_Glossary">撰写词汇条目</a> (<em>1 小时</em>)</dt> - <dd>为了满足初学者的需求,在词汇表中对术语进行清晰简明的定义、对概念进行基本总体的描述至关重要。您的教育经验对于创建优秀的词汇条目大有裨益;我们有许多<a href="/zh-CN/docs/Glossary#Contribute">缺乏定义的术语</a>需要您来完善,请放手去做吧!</dd> - <dt><a href="/zh-CN/docs/tag/needsSchema">向文章中添加插图或图表</a> (<em>1 小时</em>)</dt> - <dd>您一定了解图表在学习材料中的价值。我们的文章内容总是缺乏图表,而您正好可以大展身手。您可以从<a href="/zh-CN/docs/tag/needsSchema">缺少图表内容的文章</a>中选择一些,为其创建插图。</dd> - <dt><a href="/zh-CN/Learn/Index">阅读并复核学习文章</a> (<em>2 小时</em>)</dt> - <dd>这与上述“复核词汇条目”类似,只是由于文章更长,因此要花更多时间。</dd> - <dt><a href="/zh-CN/docs/MDN/Contribute/Howto/Write_an_article_to_help_learn_about_the_Web">撰写学习文章</a> (<em>4 小时</em>)</dt> - <dd>我们需要朴素直白的文章,介绍 Web 生态体系以及其他相关的功能主题。这些文章的目标是教育性,而非领域百科。文章应当涉及什么、如何表述,您在这方面的丰富经验大有帮助。</dd> - <dt><a href="/zh-CN/docs/MDN/Contribute/Howto/Create_an_interactive_exercise_to_help_learning_the_web">创建练习、测验或者交互式学习工具</a> (<em>? 小时</em>)</dt> - <dd>我们希望所有的学习文章都包含“主动学习 (active learning)”材料,比如练习、或者交互式内容。这些材料能够帮助用户学习并拓展理解文章中详述的概念。您可以做很多事情——创建测验、用 <a href="https://thimble.mozilla.org/" rel="external">Thimble</a> 构建可解析的交互式内容——总之,释放您的创造力吧!</dd> - <dt><a href="/zh-CN/docs/MDN/Contribute/Howto/Create_learning_pathways">创建学习路线</a> (<em>? 小时</em>)</dt> - <dd>为了提供循序渐进、易于理解的教程,我们需要把学习材料组织成体系化的路线。这个过程将收集已有的材料,并找出缺失的内容,然后用新文章填补空缺。</dd> -</dl> diff --git a/files/zh-cn/orphaned/learn/html/forms/html5_updates/index.html b/files/zh-cn/orphaned/learn/html/forms/html5_updates/index.html deleted file mode 100644 index 5d96e5faff..0000000000 --- a/files/zh-cn/orphaned/learn/html/forms/html5_updates/index.html +++ /dev/null @@ -1,145 +0,0 @@ ---- -title: HTML 中的表单 -slug: orphaned/Learn/HTML/Forms/HTML5_updates -tags: - - HTML5 - - HTML5 form updates - - form -translation_of: Learn/HTML/Forms/HTML5_updates -original_slug: Web/Guide/HTML/Forms_in_HTML ---- -<div>HTML5中的表单元素和属性提供了比HTML4更多的语义标记,并取消了大量的在HTML4不可缺少的脚本和样式。HTML5中的表单功能为用户提供了更好的体验,使表单在不同网站之间更一致,并向用户提供有关数据输入的即时反馈。它们还为使用禁用脚本的浏览器的用户提供相同的用户体验。</div> - -<div> </div> - -<div>本文总结了HTML5中的表单变化。有关使用表单的详细指南,请参阅我们更多的<a href="https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Forms">HTML表单指南</a>。</div> - -<div> </div> - -<h2 id="The_input_element" name="The_input_element"><code><input></code> 元素</h2> - -<p><code>{{HTMLElement("input")}}</code> 的 {{htmlattrxref("type", "input")}} 特性拥有更多的值。(请观看 {{HTMLElement("input")}} 获得完整列表)</p> - -<ul> - <li><code>search</code>: 这个元素呈现为一个搜索框。除了换行符会自动从输入中移除,无其他强制性语法。</li> - <li><code>tel</code>: 这个元素可现为一个编辑电话号码的输入控件。因为电话号码国际化差异非常明显,所以除了换行符会自动从输入中移除,无其他强制性语法。你可以使用如 {{htmlattrxref("pattern", "input")}} 与 {{htmlattrxref("maxlength", "input")}} 等属性来限制输入到控件中的值。</li> - <li><code>url</code>: 这个元素呈现为一个编辑<a class="external" href="http://en.wikipedia.org/URL" title="http://en.wikipedia.org/wiki/URL">URL</a> 的输入控件。换行符与首尾的空格将会被自动去除。</li> - <li> - <p><code>email</code>: 这个元素呈现为一个邮件地址。换行符会被自动去除。可以设置一个无效的邮件地址,但若满足输入框的限制,必须遵守在<span style="font-family: Arial; font-size: medium; line-height: 26px;">扩展的巴科斯范式(ABNF)中的规范:</span><code style="font-size: 14px;">1*( atext / "." ) "@" ldh-str 1*( "." ldh-str )</code><span style="line-height: 1.5em;"> 其中</span><code style="font-size: 14px;">atext</code><span style="line-height: 1.5em;"> 在规范</span><a class="external" href="http://tools.ietf.org/html/rfc5322#section-3.2.3" style="line-height: 1.5em;">RFC 5322 section 3.2.3</a> 中被定义<span style="line-height: 1.5em;">,而</span><code style="font-size: 14px;">ldh-str在规范</code><a class="external" href="http://tools.ietf.org/html/rfc1034#section-3.5" style="line-height: 1.5em;">RFC 1034 section 3.5</a> 中被定义。<span style="line-height: 1.5em;">.</span></p> - - <div class="note"><strong>注意:</strong> 若设置{{htmlattrxref("multiple", "input")}}属性,{{HTMLElement("input")}} 区域中可以用逗号分割的方式,输入多个email, 但 Firefox不支持.</div> - </li> -</ul> - -<p> {{HTMLElement("input")}} 元素也拥有一些新的特性。</p> - -<ul> - <li>{{htmlattrxref("list", "input")}}: {{HTMLElement("datalist")}} 元素的 ID,该元素的内容,{{HTMLElement("option")}} 元素被用作提示信息,会在 input 的建议区域作为提议显示出来。</li> - <li>{{htmlattrxref("pattern", "input")}}: 一个正则表达式,用于检查控件的值,能够作用于 {{htmlattrxref("type", "input")}} 值是 <code>text,</code> <code>tel,</code> <code>search,</code> <code>url,</code> 和 <code>email 的 input 元素。</code></li> - <li>{{htmlattrxref("form", "input")}}: 一个字符串,用于表明该 input 属于哪个 {{HTMLElement("form")}} 元素。一个 input 只能存在于一个表单中。</li> - <li>{{htmlattrxref("formmethod", "input")}}:一个字符串,用于表明表单提交时会使用哪个 HTTP 方法 (GET 或 POST);如果定义了它,则可以覆盖 {{HTMLElement("form")}} 元素上的 {{htmlattrxref("method", "form")}} 特性。只有当 {{htmlattrxref("type", "input")}} 值为 <code>image</code> 或 <code>submit,并且 </code>{{htmlattrxref("form", "input")}} 特性被设置的情况下, {{htmlattrxref("formmethod", "input")}} 才能生效。</li> - <li>{{htmlattrxref("x-moz-errormessage", "input")}} {{non-standard_inline}}: 一个字符串,当表单字段验证失败后显示错误信息。该值为 Mozilla 扩展,并非标准。</li> -</ul> - -<h2 id="text_input">text input</h2> - -<dl> - <dt> </dt> -</dl> - -<p>这个程序段段定义了一个用户可以输入的一行input。</p> - -<pre><code><form> - Enter your Name <input type="text" name="name"> -</form></code></pre> - -<h2 id="checkboxes"><strong>checkboxes</strong></h2> - -<p>这个程序段允许用户选择多个选项。</p> - -<pre><code><input type="checkbox" name="chk" value="" checked> Do you want the newsletter</code></pre> - -<h2 id="The_form_element" name="The_form_element">Radio < input> element</h2> - -<pre><code><form> - <input type="radio" name="frequency" value="daily">Daily<br> - <input type="radio" name="frequency" value="weekly">Weekly<br> - <input type="radio" name="frequency" value="monthly">Monthly<br> - <input type="radio" name="frequency" value="yearly">Yearly -</form></code></pre> - -<h2 id="The_form_element" name="The_form_element"><code><form></code> 元素</h2> - -<p>{{HTMLElement("form")}} 元素有了一个新特性:</p> - -<ul> - <li>{{htmlattrxref("novalidate", "form")}}:设置了该特性不会在表单提交之前对其进行验证。</li> -</ul> - -<h2 id="The_datalist_element" name="The_datalist_element"><code><datalist> 元素</code></h2> - -<p>{{HTMLElement("datalist")}} 元素会在填写 <span style="line-height: inherit;">{{HTMLElement("input")}} 字段时,显示一列</span><span style="line-height: inherit;"> {{HTMLElement("option")}} 作为提示。</span></p> - -<p>你可以使用 {{HTMLElement("input")}} 元素上的<span style="line-height: inherit;"> {{htmlattrxref("list", "input")}} 特性来将一个特定的 input 与特定的</span><span style="line-height: inherit;"> {{HTMLElement("datalist")}} 元素做关联。</span></p> - -<h2 id="The_output_element" name="The_output_element"><code><output></code> 元素</h2> - -<p><code>{{HTMLElement("output")}}</code> 元素表示计算的结果。</p> - -<p>你可以使用 {{htmlattrxref("for", "output")}} 特性来在 <code>{{HTMLElement("output")}}</code> 元素与文档内其他能够影响运算的元素(例如,input 或参数)建立关联。 {{htmlattrxref("for", "output")}} 特性的值是以空格做分隔的其他元素的 ID 列表。</p> - -<p>{{non-standard_inline}} Gecko 2.0 (其他浏览器并非如此) 支持为 <span style="line-height: inherit;">{{HTMLElement("output")}} 元素自定义有效性约束(</span><span style="line-height: 21px;">validity constraints</span><span style="line-height: inherit;">)与错误信息,可以对其使用如下 CSS 伪类:</span><span style="line-height: inherit;">{{Cssxref(":invalid")}}, {{Cssxref(":valid")}}, {{Cssxref(":-moz-ui-invalid")}},与 {{Cssxref(":-moz-ui-valid")}}。在如下情况会显得很有用:例如计算结果违反了业务规则,但却并非因为特定的 input 值出现错误(例如,</span><span style="line-height: inherit;">「百分比总数不能超过100</span><span style="line-height: inherit;">」</span><span style="line-height: inherit;">)。</span></p> - -<h2 id="The_placeholder_attribute" name="The_placeholder_attribute">placeholder 特性</h2> - -<p>{{htmlattrxref("placeholder", "input")}} 特性作用于 <code>{{HTMLElement("input")}}</code> 与 <code>{{HTMLElement("textarea")}}</code> 元素上,提示用户此域内能够输入什么内容。placeholder 中的文本不能包含回车与换行。</p> - -<h2 id="The_autofocus_attribute" name="The_autofocus_attribute">autofocus 特性</h2> - -<p>{{htmlattrxref("autofocus", "input")}} 特性让你能够指定一个表单控件,当页面载入后该表单自动获得焦点,除非用户覆盖它,例如在另一个控件中输入值。一个文档内只有一个表单能够拥有 <code>autofocus</code> 特性,它是一个 Boolean 值。这个特性适用于 <code>{{HTMLElement("input")}},</code> <code>{{HTMLElement("button")}},</code> <code>{{HTMLElement("select")}},与<font face="Lucida Grande, Lucida Sans Unicode, DejaVu Sans, Lucida, Arial, Helvetica, sans-serif"> </font></code><code>{{HTMLElement("textarea")}}</code> 元素。例外情况是,如果一个 {{htmlattrxref("autofocus", "input")}} 元素的 {{htmlattrxref("type", "input")}} 特性值设置成了 <code>hidden,则</code><span style="line-height: inherit;"> </span><code style="font-size: 14px; line-height: inherit;">autofocus</code><span style="line-height: inherit;"> 无法生效(就是说,你无法让一个隐藏控件自动获得焦点)。</span></p> - -<h2 id="The_label.control_DOM_property" name="The_label.control_DOM_property">label.control DOM 属性</h2> - -<p><code><a href="/en-US/docs/DOM/HTMLLabelElement" title="DOM/HTMLLabelElement">HTMLLabelElement</a></code> DOM 接口除了为 <code>{{HTMLElement("label")}}</code> 元素提供了对应的特性外,还提供了一个额外的属性。 <strong>control</strong> 属性返回被打上标签的控件,就是 label 适用的控件,由 {{htmlattrxref("for", "label")}} 特性(如果定义的话) 或是第一个后代元素控件来确定。</p> - -<h2 id="Constraint_Validation" name="Constraint_Validation">约束验证</h2> - -<p>HTML5 为客户端表单的验证提供了语法与 API。当然这些功能无法取代服务器端验证,<span style="line-height: inherit;">出于安全性与数据完整性的考虑,服务器端验证仍然必不可少,但是客户端验证能够通过对输入数据的即时反馈来提供良好的用户体验。</span></p> - -<p>如果 {{HTMLElement("input")}} 元素设置了<span style="line-height: inherit;"> </span><code style="font-size: 14px; line-height: inherit;">title 特性,当验证失败时,特性值会显示在提示信息中。如果</code><span style="line-height: inherit;"> </span><code style="font-size: 14px; line-height: inherit;">title</code><span style="line-height: inherit;"> 设置为空字符串,则不会显示提示信息。如果没有设置 </span><code style="font-size: 14px; line-height: inherit;">title</code><span style="line-height: inherit;"> 特性,会使用标准验证信息(例如通过 {{htmlattrxref("x-moz-errormessage")}} 特性指定,或调用 </span><code style="font-size: 14px; line-height: inherit;">setCustomValidity()</code><span style="line-height: inherit;"> 方法) 代为显示。</span></p> - -<div class="note"><strong>注意:</strong> 约束验证不支持表单中的 {{HTMLElement("button")}} 元素;若想基于表单的验证结果来改变按钮的样式,可以使用 {{cssxref(":-moz-submit-invalid")}} 伪类。</div> - -<h3 id="HTML_Syntax_for_Constraint_Validation" name="HTML_Syntax_for_Constraint_Validation">约束验证的 HTML 语法</h3> - -<p>下列 HTML5 语法中的条目用于为表单数据指定约束。</p> - -<ul> - <li>{{HTMLElement("input")}}, {{HTMLElement("select")}}, 和 {{HTMLElement("textarea")}} 元素上的 {{htmlattrxref("required", "input")}} 特性,指定必须提供该元素的值。(在 {{HTMLElement("input")}} 元素上, {{htmlattrxref("required", "input")}} 只能与特定的 {{htmlattrxref("type", "input")}} 特性值结合起来生效。)</li> - <li>{{HTMLElement("input")}} 元素上的 {{htmlattrxref("pattern", "input")}} 特性用于限定元素值必须匹配一个特定的正则表达式。</li> - <li>{{HTMLElement("input")}} 元素上的 {{htmlattrxref("min", "input")}} 与 {{htmlattrxref("max", "input")}} 特性限定了能够输入元素的最大与最小值。</li> - <li>{{HTMLElement("input")}} 元素的 {{htmlattrxref("step", "input")}} 特性(与 {{htmlattrxref("min", "input")}} 与 {{htmlattrxref("max", "input")}} 特性结合使用) 限定了输入值的间隔。如果一个值与允许值的梯级不相符,则它无法通过验证。</li> - <li>{{HTMLElement("input")}} 与 {{HTMLElement("textarea")}} 元素的 {{htmlattrxref("maxlength", "input")}} 特性限制了用户能够输入的最大字符数(在 Unicode 代码点内)。</li> - <li>{{htmlattrxref("type", "input")}} 的 <code>url</code> 与 <code>email</code> 值分别用于限制输入值是否为有效的 URL 或电子邮件地址。</li> -</ul> - -<p>此外,若要阻止对表单进行约束验证,你可以在 <span style="line-height: inherit;">{{HTMLElement("form")}} 上设置</span><span style="line-height: inherit;"> </span><span style="line-height: inherit;">{{htmlattrxref("novalidate", "form")}} 特性,或在 </span><span style="line-height: inherit;">{{HTMLElement("button")}} 与 {{HTMLElement("input")}} 元素(当 </span><span style="line-height: inherit;">{{htmlattrxref("type", "input")}} 是 </span><code style="font-size: 14px; line-height: inherit;">submit</code><span style="line-height: inherit;"> 或 </span><code style="font-size: 14px; line-height: inherit;">image</code><span style="line-height: inherit;">)上设置 </span><span style="line-height: inherit;">{{htmlattrxref("formnovalidate", "button")}} 特性。这些特性指定了当表单提交时不做验证。</span></p> - -<h3 id="Constraint_Validation_API" name="Constraint_Validation_API">约束验证 API</h3> - -<p>下面这些 DOM 属性与方法和约束验证相关,能够在客户端脚本中使用:</p> - -<ul> - <li><code><a href="/en-US/docs/DOM/HTMLFormElement" title="DOM/HTMLFormElement">HTMLFormElement</a></code> 对象上的 <code>checkValidity()</code> 方法,当表单的相关元素都通过了它们的约束验证时返回 true,否则返回 false。</li> - <li>在 <a href="/en-US/docs/HTML/Content_categories#Form-associated" title="HTML/Content Categories#form-associated">表单相关元素</a>上: - <ul> - <li><code>willValidate</code> 属性,如果元素的约束没有被符合则值为 false。</li> - <li><code>validity</code> 属性,是一个 <code><a href="/en-US/docs/DOM/ValidityState" title="DOM/ValidityState Interface">ValidityState</a></code> 对象,表示元素当前所处的验证状态(就是说约束成功或是失败)。</li> - <li><code>validationMessage</code> 属性,用于描述与元素相关约束的失败信息。</li> - <li><code>checkValidity()</code> 方法,如果元素没有满足它的任意约束,返回false,其他情况返回 true。</li> - <li><code>setCustomValidity()</code> 方法,设置自定义验证信息,用于即将实施与验证的约束来覆盖预定义的信息。</li> - </ul> - </li> -</ul> - -<div>{{HTML5ArticleTOC}}</div> diff --git a/files/zh-cn/orphaned/learn/html/forms_and_buttons/index.html b/files/zh-cn/orphaned/learn/html/forms_and_buttons/index.html deleted file mode 100644 index 443876e6a3..0000000000 --- a/files/zh-cn/orphaned/learn/html/forms_and_buttons/index.html +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: 表单和按钮 -slug: orphaned/Learn/HTML/Forms_and_buttons -tags: - - 初学者 - - 指引 - - 文章 - - 表单 -translation_of: Learn/HTML/Forms_and_buttons -original_slug: learn/HTML/Forms_and_buttons ---- -<p>{{draft}}{{LearnSidebar}}</p> - -<p class="summary">表单和按钮是Web的一个非常重要的部分 - 这些允许您的站点访问者输入数据并将其发送给您(例如注册,登录和反馈表单),并且您可以实现控制以控制复杂功能(例如提交表单) 到服务器,或暂停播放视频。)这个模块可以帮助您入门。</p> - -<h2 id="先决条件">先决条件</h2> - -<p>在开始本单元之前,您应该对<a href="/en-US/docs/Learn/HTML/Introduction_to_HTML">HTML的基础知识</a>有一定的了解,如HTML简介中所述。 如果你没有通过这个模块(或类似的东西),先完成它,然后再回来!</p> - -<div class="note"> -<p><strong>Note</strong>: 如果你是在计算机/平板电脑等其他你无法创建文件的设备上的话,你可以尝试在在线代码编辑平台上运行代码例如 <a class="external external-icon" href="http://jsbin.com/" rel="noopener">JSBin</a> 或 <a class="external external-icon" href="https://thimble.mozilla.org/" rel="noopener">Thimble</a>.</p> -</div> - -<h2 id="向导">向导</h2> - -<p>本模块包含以下的文章</p> - -<dl> - <dt><a href="/en-US/docs/Learn/HTML/Forms_and_buttons/Basics">表单和按钮基础知识</a>(Form and button basics)</dt> - <dd> 在本文中,我们将向您介绍HTML表单的基础知识,包括它们的用途,基本功能和常用表单控件。 我们还将了解HTML按钮以及如何使用它们。</dd> - <dt>形成语义和结构</dt> - <dd> 存在许多元素,允许我们将表单结构化为更易于使用和访问 - 其中一些是专门的表单元素,其中一些是通用HTML容器。 在本文中,我们将介绍创建表单结构的最佳实践。</dd> - <dt>高级表单功能</dt> - <dd> 在这里,我们将介绍HTML表单中可用的一些更高级的功能,例如数据列表,进度条,滑块以及最小值和最大值。</dd> - <dt>表格验证</dt> - <dd> 在我们的最终表单文章中,我们将讨论表单验证,讨论为什么有必要,并查看HTML选项卡提供的一些功能,以便客户端验证表单数据。</dd> -</dl> - -<h2 id="练习">练习</h2> - -<dl> - <dt>表单练习</dt> - <dd>等待完成(to be done)</dd> -</dl> diff --git a/files/zh-cn/orphaned/learn/server-side/express_nodejs/installing_on_pws_cloud_foundry/index.html b/files/zh-cn/orphaned/learn/server-side/express_nodejs/installing_on_pws_cloud_foundry/index.html deleted file mode 100644 index 125d31931d..0000000000 --- a/files/zh-cn/orphaned/learn/server-side/express_nodejs/installing_on_pws_cloud_foundry/index.html +++ /dev/null @@ -1,243 +0,0 @@ ---- -title: 在 PWS/Cloud Foundry 上,安装 LocalLibrary -slug: orphaned/learn/Server-side/Express_Nodejs/Installing_on_PWS_Cloud_Foundry -translation_of: Learn/Server-side/Express_Nodejs/Installing_on_PWS_Cloud_Foundry -original_slug: learn/Server-side/Express_Nodejs/Installing_on_PWS_Cloud_Foundry ---- -<div>{{LearnSidebar}}</div> - -<p class="summary">本文提供了如何在 <a href="http://run.pivotal.io">Pivotal Web Services PaaS cloud </a>云上安装 LocalLibrary的实际演示 - 这是 Heroku 的全功能,开源替代品,Heroku 是我们<a href="/zh-CN/docs/Learn/Server-side/Express_Nodejs/deployment">教程第 7 部分</a>中使用的 PaaS 云服务。如果您正在寻找 Heroku(或其他 PaaS 云服务)的替代方案,或者只是想尝试不同的东西,PWS / Cloud Foundry 绝对值得一试。</p> - -<h2 id="为什么是_PWS">为什么是 PWS?</h2> - -<p>Pivotal Web Services 是<a href="https://www.cloudfoundry.org/">开源云代工平台</a>的公共实例。它是一个多语言平台,支持许多不同的语言,包括Node.js,Java,PHP,Python,Staticfiles 和 Ruby。它有一个免费试用版,对于运行 Node 应用程序非常有效!由于 Node 和 Express 是开源项目,因此与使用 Cloud Foundry 等开放式部署平台保持一致。您可以<a href="https://github.com/cloudfoundry">深入了解</a>应用程序的托管方式。</p> - -<p>使用PWS有多种原因!</p> - -<ul> - <li>PWS具有<a href="https://run.pivotla.io/pricing">灵活的定价</a>,可以很好地适应 node 等小型运行。你可以用每月不到 5 美元的价格,运行一对冗余的应用程序。这包括备用故障转移系统,如果主服务器在任何时候出现故障,它将接管运行您的应用程序。</li> - <li>作为PaaS,PWS为我们提供了大量的 Web 基础设施。这使得入门更加容易,因为您不必担心服务器、负载平衡器、反向代理、崩溃时重新启动网站,或者PWS 为我们提供的任何其他 Web 基础结构。</li> - <li>因为 PWS 使用的是 Cloud Foundry,一个开放的平台。因此,您可以轻松地将应用程序,部署到其他 Cloud Foundry 提供商,例如 <a href="https://www.ibm.com/cloud-computing/bluemix/">IBM BlueMix</a>, <a href="https://www.anynines.com/">AnyNines</a> 和 <a href="https://www.swisscom.ch/en/business/enterprise/offer/cloud-data-center-services/paas/application-cloud.html">Swisscomm Application Cloud</a>。以下说明,适用于任何标准的 Cloud Foundry 部署,只需稍加修改即可。</li> - <li>虽然它确实有一些限制,但这些不会影响这个特定的应用程序。例如: - <ul> - <li>PWS 和 Cloud Foundry 仅提供短期存储,因此用户上载的文件,无法安全地长期存储在 PWS 本身上。</li> - <li>免费试用一年有效,限制最高 87美元的应用程序使用量。对于典型的 Node 应用程序,这意味着您可以运行一整年的应用程序。</li> - </ul> - </li> - <li>大多数情况下它只是可以工作,如果你最终喜欢它,并希望升级,那么扩展你的应用程序非常容易。</li> - <li>PWS 和其他 Cloud Foundry 应用程序,可用于生产级别的应用程序。</li> -</ul> - -<h2 id="PWS_是如何工作的?">PWS 是如何工作的?</h2> - -<p>PWS通过容器来运行网站和应用已经有些年头了。Cloud Foundry一开始采用的容器技术名为Warden,现在使用的是名为Garden的容器系统。这些技术与流行的Docker容器很相似,而且事实上Cloud Foundry云平台的很多设施都支持部署Docker容器。</p> - -<p>使用Cloud Foundry云平台的好处之一是您不需要创建容器规范,因为Cloud Foundry的构建包会基于最新的组件来生成它们。由于容器是临时部署的,而且可能随时被清理并部署到云中的其他位置,所以Cloud Foundry云平台上的应用需要遵循<a href="https://12factor.net/zh_cn/">十二要素准则</a>。如此可以确保您的应用和平台使用最新的软件。一个应用程序可以包含多个实例,在这些实例中,应用程序被放置到冗余容器中,从而实现应用程序的高可用性。Cloud Foundry会自动处理相同实例之间的所有负载平衡。这允许您扩展应用程序的性能和可用性。</p> - -<p>由于文件系统是临时的,所以任何临时存储或服务都应该使用备份服务放置到其他地方。这可以通过使用不同提供商提供的市场服务或通过<a href="https://docs.run.pivotal.io/devguide/services/user-provided.html">用户自己提供的服务</a>来实现。</p> - -<h2 id="What_do_we_cover_below">What do we cover below?</h2> - -<p>This post covers how to modify the LocalLibrary application from the tutorial for deployment on PWS and Cloud Foundry. In doing so, it covers the basics of deploying any node.js application to PWS with the following steps.</p> - -<ul> - <li>Configuring the package.json file to run with the engines available on PWS.</li> - <li>Adding and installing the<a href="https://github.com/cloudfoundry-community/node-cfenv"> 'cfenv' node module</a> to make working with services easier.</li> - <li>Using the cfenv module to connect to a MongoDB instance from mLab that was created and bound using the PWS marketplace.</li> - <li>Using the <a href="https://github.com/cloudfoundry/cli">cf CLI</a> tool to create a new mongoDB service instance and bind it to the local library application.</li> - <li>How to set environment variables for Node using the cf CLI.</li> - <li>How to look at logs, again using the cf CLI tool.</li> -</ul> - -<p>So let's get started. You have two options, you can go through the tutorial from the <a href="<https://developer.mozilla.org/en-US/docs/Learn/Server-side/Express_Nodejs/Tutorial_local_library_website>">beginning</a> or you can just download the completed project and modify it from there for use on PWS. To do the latter, you can do the following from a terminal:</p> - -<pre class="brush: bash notranslate"><code>git clone https://github.com/mdn/express-locallibrary-tutorial</code></pre> - -<p>You'll then need to follow the preparation steps listed in the <a href="/en-US/docs/Learn/Server-side/Express_Nodejs/deployment#Getting_your_website_ready_to_publish">Getting your website ready to publish</a> section of <a href="/en-US/docs/Learn/Server-side/Express_Nodejs/deployment">Express Tutorial Part 7: Deploying to production</a>, before then following the steps listed below.</p> - -<div class="note"> -<p><strong>Note</strong>: This work flow is based on the <a href="/en-US/docs/Learn/Server-side/Express_Nodejs/deployment#Example_Installing_LocalLibrary_on_Heroku">Mozilla Heroku work flow in the main Express/Node tutorial series</a> for consistency, to help readers compare and contrast. </p> -</div> - -<h2 id="Modifying_the_LocalLibrary_for_PWS">Modifying the LocalLibrary for PWS</h2> - -<p id="How_does_PWS_work">Deployment of a Node application on Cloud Foundry takes the following steps. Using the downloaded 'cf' CLI tool on your environment, your source code and supporting metadata files are uploaded to Cloud Foundry which will assemble and package the components of your application. Note that your files need to be located on your system to deploy or as a zip archive somewhere accessible on the internet. We'll assume the former.</p> - -<p>This means, no assumptions about which source control system is used. As long as you have a complete source tree in your local file system you can deploy the app. There are some things you have to make available to ensure the correctly assembly of your Node application. First Cloud Foundry cf CLI will look for the presence of the 'package.json' file to determine the dependencies and download the necessary components. The rules of this assembly are defined in Cloud Foundry's <a href="http://docs.run.pivotal.io/buildpacks/node/">nodejs buildpack</a>. An optional cloud foundry manifest file can specify information about your application such as name, size and start command if non-standard. In addition to deploying the application, the cf CLI tool can also configure services, set environment variables and view logs. That's all the overview you need in order to get started (see <a href="https://docs.run.pivotal.io">Getting Started on Pivotal Web Services</a> for a more comprehensive guide). Let's start making the changes so you'll need to deploy the <em>LocalLibrary</em> application to PWS.</p> - -<h3 id="Set_node_version">Set node version</h3> - -<p>The <strong>package.json</strong> contains everything needed to work out your application dependencies and what file should be launched to start your site. Cloud Foundry and PWS detects the presence of this file, and will use it to provision your app environment. The only useful information missing in our current <strong>package.json</strong> is the version of node. We can find the version of node we're using for development by entering the command:</p> - -<pre class="brush: bash notranslate">node --version -# <em>will return version e.g. v6.10.3</em></pre> - -<p>Open <strong>package.json</strong> with a text editor, and add this information as an <strong>engines > node</strong> section as shown (using the version number retrieved above).</p> - -<pre class="brush: json notranslate">{ - "name": "express-locallibrary-tutorial", - "version": "0.0.0", -<strong> "engines": { - "node": "6.10.3" - },</strong> - "private": true, - ... -</pre> - -<h3 id="Database_configuration">Database configuration</h3> - -<p>So far in this tutorial we've used a single database that is hard coded into the <strong>app.js </strong>file. Normally we'd like to be able to have a different database for production and development, so next we'll modify the LocalLibrary website to get the database URI from the OS environment, and otherwise use our development database that we added manually earlier. Cloud Foundry has a very flexible services model that enables multiple services of the same type to exist in the environment. It stores all services related configurations in a single parseable JSON object called <code>VCAP_SERVICES</code>. A typical <code>VCAP_SERVICES</code> variable looks like this:</p> - -<pre class="brush: json notranslate">{ - "VCAP_SERVICES": { - "mlab": [ - { - "credentials": { - "uri": "mongodb://CloudFoundry_test_dev:somecr8zypassw0rd@dbhost.mlab.com:57971/CloudFoundry_dbname" - }, - "label": "mlab", - "name": "node-express-tutorial-mongodb", - "plan": "sandbox", - "provider": null, - "syslog_drain_url": null, - "tags": [ - "Cloud Databases", - "Developer Tools", - "Web-based", - "Data Store", - ], - "volume_mounts": [] - } - ] - } -} - -</pre> - -<p>Writing the code to extract and parse this environment variable is not hard, but it doesn't add a lot of value when others have written libraries to do this. In this case, there is a node.js package we can use called <a href="https://github.com/cloudfoundry-community/node-cfenv"><em>cfenv</em></a>.</p> - -<p>This will download the cfenv module and its dependencies, and modify the package.json file as required. Open <strong>app.js</strong> and find the block with all the 'requires' that load the modules into your application. In this example look for the line that looks something like this:</p> - -<pre class="brush: js notranslate">var expressValidator = require('express-validator');</pre> - -<p>If you cannot find that exact line, look for the blocks of 'requires' and look for the last one. Add the following text after it:</p> - -<pre class="brush: js notranslate">var cfenv = require('cfenv');</pre> - -<ol> - <li> - <p>To install the package, go to your terminal and make sure you are in the directory where the <code>package.json</code> file for LocalLibrary is. From the command line, type:</p> - - <pre class="brush: bash notranslate">npm install cfenv</pre> - </li> - <li> - <p>Now that you have loaded the module, this next line will instantiate an object that will contain the app and services information required for deployment. Add the following after the line that contains <code>app.use(helmet());</code></p> - - <pre class="brush: js notranslate">// Set up CF environment variables -var appEnv = cfenv.getAppEnv(); -</pre> - - <p>When this line executes, all the Cloud Foundry application environment information will become available to the application in the <code>appEnv</code> object.</p> - </li> - <li> - <p>Now it is time to update the application to use the database configured by the platform. Find the line that sets the mongoDB connection variable. It will look something like this:</p> - - <pre class="brush: js notranslate">var mongoDB = process.env.MONGODB_URI || dev_db_url;</pre> - </li> - <li> - <p>You will now modify the line with the following code <code>appEnv.getServiceURL('node-express-tutorial-mongodb')</code> to get the connection string from an environment variable that is being managed by the <code>cfenv</code> module. If no service has been created and bound it will use your own database URL you created as part of the tutorial instead of the one from the environment. So replace the line above with the following:</p> - - <pre class="brush: js notranslate">var mongoDB = appEnv.getServiceURL('node-express-tutorial-mongodb') || dev_db_url; -</pre> - </li> - <li> - <p>Now run the site locally (see <a href="https://developer.mozilla.org/en-US/docs/Learn/Server-side/Express_Nodejs/routes#Testing_the_routes">Testing the routes</a> for the relevant commands) and check that the site still behaves as you expect. At this point your app is ready to use with Cloud Foundry and Pivotal Web Services.</p> - </li> -</ol> - -<h2 id="Get_a_Pivotal_Web_Services_account">Get a Pivotal Web Services account</h2> - -<p>To start using Pivotal Web Services you will first need to create an account (skip ahead to <a href="#Create_and_upload_the_website">Create and upload the website</a> if you've already got an account and have already installed the PWS cf CLI client).</p> - -<ul> - <li>Go to <a href="https://run.pivotal.io">https://run.pivotal.io</a> and click the <strong>SIGN UP FOR FREE</strong> button.</li> - <li>Enter your details and then press <strong>CREATE FREE ACCOUNT</strong>. You'll be asked to check your email for a sign-up email.</li> - <li>Click the account activation link in the signup email. You'll be taken back to your account on the web browser and you will complete the registration.</li> - <li>You will set your password and go through the rest of the new user sign up and how to claim your free trial account. Note you need a mobile phone to confirm your account. You will receive an "org" account funded with $87 of application usage credit. Note your email account can be in multiple orgs on PWS. This is similar to your user account on services like GitHub.</li> - <li>Go to <a href="https://login.run.pivotal.io">https://console.run.pivotal.io</a> and login in. You'll then be logged in and taken to the PWS dashboard: <a href="https://console.run.pivotal.io">https://console.run.pivotal.io</a>.</li> -</ul> - -<h2 id="Install_the_cf_CLI_client">Install the cf CLI client</h2> - -<p>The cf CLI client is a software tool for managing and deploying your application. Download and install the PWS cf CLI client by following the <a href="https://console.run.pivotal.io/tools">instructions on Pivotal Web Services</a> or downloading directly from <a href="https://github.com/cloudfoundry/cli">GIthub</a>. Be sure to download the correct version for your computer. After the client is installed you will be able run commands, for example to get help on the client:</p> - -<pre class="brush: bash notranslate">cf help -</pre> - -<p>We'll now go through the steps to login to PWS using the CLI and deploy — or in Cloud Foundry parlance "push" your app.</p> - -<h2 id="Create_and_upload_the_website">Create and upload the website</h2> - -<p>To create the app we navigate to the directory where our modified files are. This is the same directory where the LocalLibrary package.json file is located. First, let's tell the cf CLI which Cloud Foundry instance you want to use. We need to do this, since the cf CLI tool can be used with any standard Cloud Foundry system, so this command indicates which specific Cloud Foundry you are using. Enter the following terminal command now:</p> - -<pre class="brush: bash notranslate">cf api api.run.pivotal.io</pre> - -<p>Next login using the following command (enter your email and password when prompted):</p> - -<pre class="brush: bash notranslate">cf login -Email: enter your email -Password: enter your password</pre> - -<p>We can now push our app to PWS. In the below example. replace 'some-unique-name' with something you can remember that is likely to be unique. If it isn't unique, the system will let you know. The reason this name has to be unique to the PWS system is it is the address we will use to to access your LocalLibrary application. I used <em>mozilla-express-tutorial-xyzzy</em>. You should use something else.</p> - -<pre class="brush: bash notranslate">cf push some-unique-name -m 256MB</pre> - -<p>Note the <code>-m</code> flag we added is not required. We just included it so that we only use 256MB of memory to run the app. Node apps typically can run in 128 MB, but we are being safe. If we didn't specify the memory, the CLI would use the default 1 GB of memory, but we want to make sure your trial lasts longer. You should now see a bunch of text on the screen. It will indicate that the CLI is uploading all your files, that it's using the node buildpack, and it will start the app. If we're lucky, the app is now "running" on the site at the URL <code>https://some-unique-name.cfapps.io</code>. Open your browser and run the new website by going to that URL.</p> - -<div class="note"><strong>Note</strong>: The site will be running using our hardcoded development database at this time. Create some books and other objects, and check out whether the site is behaving as you expect. In the next section we'll set it to use our new database.</div> - -<h2 id="Setting_configuration_variables">Setting configuration variables</h2> - -<p>You will recall from a preceding section that we need to <a href="#NODE_ENV">set NODE_ENV to 'production'</a> in order to improve our performance and generate less-verbose error messages.</p> - -<ol> - <li> - <p>Do this by entering the following command:</p> - - <pre class="brush: bash notranslate">cf set-env some-unique-name NODE_ENV production -</pre> - </li> - <li> - <p>We should also use a separate database for production. Cloud Foundry can take advantage of a marketplace to create a new service and automatically bind it to your app. Bind means place the service database credentials in the environment variable space of the container running your application for you to access. Enter the following commands:</p> - - <pre class="brush: bash notranslate">cf create-service mlab sandbox node-express-tutorial-mongodb -cf bind-service some-unique-name node-express-tutorial-mongodb -</pre> - </li> - <li> - <p>You can inspect your configuration variables at any time using the <code>cf env some-unique-name</code> command — try this now:</p> - - <pre class="brush: bash notranslate">cf env some-unique-name -</pre> - </li> - <li> - <p>In order for your applications to use the new credentials you will have to restage your application, meaning that it will restart and apply the new environment variables. This can be done using the following — enter this command now:</p> - - <pre class="brush: bash notranslate">cf restage some-unique-name -</pre> - </li> - <li> - <p>If you check the home page now it should show zero values for your object counts, as the changes above mean that we're now using a new (empty) database.</p> - </li> -</ol> - -<h2 id="Debugging">Debugging</h2> - -<p>The PWS cf client provides a few tools for debugging:</p> - -<pre class="brush: bash notranslate">>cf logs some-unique-name --recent # Show current logs ->cf logs some-unique-name # Show current logs and keep updating with any new results</pre> - -<h2 id="Summary">Summary</h2> - -<p>If you followed the above steps, you should have now deployed the LocalLibrary app to PWS. Well done! If the deployment wasn't successful, double check all the steps.</p> |