如果服务器中的图像不可用,我试图显示默认图像。 business.profilePic
是从服务器onerror
动态加载的,我想显示静态文件夹中的图像
cell1.innerHTML = '{% load static %}<img class="img-responsive"
src=' + business.profilePic + 'width="60" onerror="this.onerror = null;
this.src={% static search/GoCheck_Logo.png %}" height="80" alt="Logo">';
在html正文中,{% load static %}
工作正常,但在javascript我不知道该怎么做