freeCodeCamp/curriculum/challenges/chinese-traditional/01-responsive-web-design/basic-html-and-html5/create-a-text-field.md

1.6 KiB

id title challengeType videoUrl forumTopicId dashedName
bad87fee1348bd9aedf08829 創建一個輸入框 0 https://scrimba.com/p/pVMPUv/c2EVnf6 16823 create-a-text-field

--description--

現在讓我們來創建一個 Web 表單。

input 輸入框可以讓你輕鬆獲得用戶的輸入。

你可以像這樣創建一個文本輸入框:

<input type="text">

注意 input 輸入框是沒有結束標籤的。

--instructions--

在列表下面創建一個類型爲 textinput 輸入框。

--hints--

網頁中應存在一個類型爲 textinput 輸入框。

assert($('input[type=text]').length > 0);

--seed--

--seed-contents--

<h2>CatPhotoApp</h2>
<main>
  <p>Click here to view more <a href="#">cat photos</a>.</p>

  <a href="#"><img src="https://www.bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>

  <p>Things cats love:</p>
  <ul>
    <li>cat nip</li>
    <li>laser pointers</li>
    <li>lasagna</li>
  </ul>
  <p>Top 3 things cats hate:</p>
  <ol>
    <li>flea treatment</li>
    <li>thunder</li>
    <li>other cats</li>
  </ol>


</main>

--solutions--

<h2>CatPhotoApp</h2>
<main>
  <p>Click here to view more <a href="#">cat photos</a>.</p>

  <a href="#"><img src="https://www.bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>

  <p>Things cats love:</p>
  <ul>
    <li>cat nip</li>
    <li>laser pointers</li>
    <li>lasagna</li>
  </ul>
  <p>Top 3 things cats hate:</p>
  <ol>
    <li>flea treatment</li>
    <li>thunder</li>
    <li>other cats</li>
  </ol>
  <form>
    <input type="text">
  </form>
</main>