banner.style.backgroundImage = "url('"+ bgimage[index] +"')";
bgimage[index]要在字符串外面,取值后再用+号与前后的字符串拼接
检查一下页面元素,是否src没加上。以及控制台是否有报错。