无法显示的书籍仅包含URL

时间:2018-07-18 07:43:44

标签: javascript url

我有一个包含一些书籍信息的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);        
    }


}

0 个答案:

没有答案