--- id: 60fab9f17fa294054b74228c title: 步驟 30 challengeType: 0 dashedName: step-30 --- # --description-- 現在到了最後一個 `fieldset`。 如果你想允許用戶上傳個人資料圖片,應該怎麼做呢? 類型爲 `file` 的 `input` 可以實現。 添加一個 `label`,其文本爲 `Upload a profile picture:`,添加一個可以接收文件上傳的 `input`。 # --hints-- 應該添加一個 `label` 並設置其文字爲 `Upload a profile picture:`。 ```js assert.match(document.querySelector('fieldset:nth-child(3) > label')?.innerText, /Upload a profile picture:/i); ``` 應該在 `label` 元素內添加一個 `input` 元素。 ```js assert.exists(document.querySelector('fieldset:nth-child(3) > label > input')); ``` `input` 元素的 `type` 應該爲 `file`。 ```js assert.equal(document.querySelector('fieldset:nth-child(3) > label > input')?.type, 'file'); ``` # --seed-- ## --seed-contents-- ```html Registration Form

Registration Form

Please fill out this form with the required information

--fcc-editable-region--
--fcc-editable-region--
``` ```css body { width: 100%; height: 100vh; margin: 0; background-color: #1b1b32; color: #f5f6f7; } label { display: block; margin: 0.5rem 0; } ```