--- id: 587d7fae367417b2b2512be6 title: 渲染數據源的圖像 challengeType: 6 forumTopicId: 18265 dashedName: render-images-from-data-sources --- # --description-- 前幾個挑戰中表明,JSON 數組中的每個對象都包含一個 `imageLink` 鍵,其值爲貓圖像的 URL。 當你遍歷這些對象的時候,你可以使用 `imageLink` 屬性在 `img` 元素中顯示此圖像。 這是執行此操作的代碼: ```js html += ""; ``` # --instructions-- 添加代碼以在 `img` 標記中使用 `imageLink` 和 `altText` 屬性。 # --hints-- 應該使用 `imageLink` 屬性來顯示圖像。 ```js assert(code.match(/val\.imageLink/g)); ``` 應該使用 `altText` 作爲圖片的 `alt` 屬性值。 ```js assert(code.match(/val\.altText/g)); ``` # --seed-- ## --seed-contents-- ```html

Cat Photo Finder

The message will go here

``` # --solutions-- ```html

Cat Photo Finder

The message will go here

```