--- id: 60f81167d0d4910809f88945 title: 步驟 19 challengeType: 0 dashedName: step-19 --- # --description-- 距離父級 `form` 元素最近的第一個 `type` 爲 `submit` 的 `input` 元素會被當作提交按鈕。 爲了處理表單提交,在最後 `fieldset` 元素後添加一個 `input` 元素,其 `type` 屬性設置爲 `submit`,`value` 屬性設置爲 `Submit`。 # --hints-- 應該將 `input` 元素添加到最後一個 `fieldset` 元素後。 ```js assert.exists(document.querySelectorAll('fieldset')?.[2]?.nextElementSibling?.tagName, 'input'); ``` `input` 的 `type` 屬性值應該爲 `submit`。 ```js assert.exists(document.querySelector('fieldset + input[type="submit"]')); ``` `input` 元素的 `value` 屬性值應該爲 `Submit`。 ```js assert.exists(document.querySelector('fieldset + input[value="Submit"]')); ``` # --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; } ```