我有一个包含一些书籍信息的json文件。我试图显示书籍封面,但是我只能显示封面的URL。请帮忙!
function fillBookShelf() {
var bookShelf = document.getElementById('bookShelf');
bookShelf.innerHTML = ' ';
for (var i = 0; i < bookList.length; i++) {
console.log(i)
var cover = bookList[i].portada;
var bigCover = bookList[i].detalle;
var language = bookList[i].idioma;
var title = bookList[i].titulo;
var description = bookList[i].descripcion;
var book = document.createElement('div');
book.append(cover);
bookShelf.append(book);
}
}