freeCodeCamp/curriculum/challenges/chinese/01-responsive-web-design/responsive-web-design-projects/build-a-survey-form.chinese.md

39 lines
4.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
id: 587d78af367417b2b2512b03
title: Build a Survey Form
isRequired: true
challengeType: 3
videoUrl: ''
localeTitle: 建立调查表格
---
## Description
<section id="description"> <strong>目标:</strong>构建一个功能类似于此的<a href="https://codepen.io" target="_blank">CodePen.io</a>应用程序: <a href="https://codepen.io/freeCodeCamp/full/VPaoNP" target="_blank">https</a> <strong></strong> <a href="https://codepen.io" target="_blank">//codepen.io/freeCodeCamp/full/VPaoNP</a> 。完成以下<a href="https://en.wikipedia.org/wiki/User_story" target="_blank">用户故事</a>并通过所有测试。给它你自己的个人风格。您可以使用HTMLJavaScript和CSS来完成此项目。建议使用纯CSS因为这是迄今为止所涵盖的课程您应该使用纯CSS进行一些练习。如果您愿意可以使用Bootstrap或SASS。此项目不建议使用其他技术例如jQueryReactAngular或Vue使用它们需要您自担风险。其他项目将使您有机会使用不同的技术堆栈如React。我们将接受并尝试修复所有使用建议的技术堆栈的问题报告。快乐的编码 <strong>用户故事1</strong>我可以在H1大小的文本中看到<code>id=&quot;title&quot;</code><strong>用户故事2</strong>我可以在P大小的文本中看到<code>id=&quot;description&quot;</code>的简短说明。 <strong>用户故事3</strong>我可以看到一个<code>form</code><code>id=&quot;survey-form&quot;</code><strong>用户故事4</strong>在表单元素中,我需要在<code>id=&quot;name&quot;</code>的字段中输入我的名字。 <strong>用户故事5</strong>在表单元素中,我需要在<code>id=&quot;email&quot;</code>的字段中输入<code>id=&quot;email&quot;</code><strong>用户故事6</strong>如果我输入的格式不正确的电子邮件我将看到HTML5验证错误。 <strong>用户故事7</strong>在表单中,我可以在<code>id=&quot;number&quot;</code>的字段中输入一个数字。 <strong>用户故事8</strong>如果我在数字输入中输入非数字我将看到HTML5验证错误。 <strong>用户故事9</strong>如果我输入数字输入范围之外的数字(由<code>min</code><code>max</code>属性定义我将看到HTML5验证错误。 <strong>用户故事10</strong>对于表单中的名称电子邮件和数字输入字段我可以看到使用以下ID描述每个字段用途的相应标签 <code>id=&quot;name-label&quot;</code> <code>id=&quot;email-label&quot;</code> ,和<code>id=&quot;number-label&quot;</code><strong>用户故事11</strong>对于名称,电子邮件和数字输入字段,我可以看到占位符文本,它为我提供了每个字段的说明或说明。 <strong>用户故事12</strong>在表单元素中,我可以从下拉列表中选择一个具有相应<code>id=&quot;dropdown&quot;</code><strong>用户故事13</strong>在表单元素中,我可以从一组或多组单选按钮中选择一个字段。应使用<code>name</code>属性对每个组进行分组。 <strong>用户故事14</strong>在表单元素中,我可以从一系列复选框中选择几个字段,每个复选框都必须具有<code>value</code>属性。 <strong>用户故事15</strong>在表单元素中,我最后会看到一个<code>textarea</code>以获取其他评论。 <strong>用户故事16</strong>在表单元素中,我看到一个<code>id=&quot;submit&quot;</code>的按钮,以提交我的所有输入。您可以通过分叉<a href="http://codepen.io/freeCodeCamp/pen/MJjpwO" target="_blank">此CodePen笔</a>来构建项目。或者您可以使用此CDN链接在您喜欢的任何环境中运行测试 <code>https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js</code> <code>https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js</code>完成后将URL提交给您的工作通过所有测试的项目。如果卡住请记住使用<a href="https://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514" target="_blank">Read-Search-Ask</a>方法。 </section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests: []
```
</section>
## Challenge Seed
<section id='challengeSeed'>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>