imageLink
键,其值为cat图像的URL。循环浏览这些对象时,可以使用此imageLink
属性在img
元素中显示此图像。这是执行此操作的代码: html += "<img src = '" + val.imageLink + "' " + "alt='" + val.altText + "'>";
img
标记中使用imageLink
和altText
属性。 imageLink
属性来显示图像。
testString: 'assert(code.match(/val\.imageLink/g), "You should use the imageLink
property to display the images.");'
```
```