给元素添加class方式
var element = document.createElement('div');
element.classList.add('hello');
插入图片
var myIcon = new Image();
myIcon.src = Icon;
element.appendChild(myIcon);
var element = document.createElement('div');
element.classList.add('hello');
var myIcon = new Image();
myIcon.src = Icon;
element.appendChild(myIcon);