js 往dom元素中插入类名

index.js

const img = document.createElement('img')
// const img = new Image()

img.classList.add('avatar')

posted on 2021-09-09 10:26  aisowe  阅读(298)  评论(0编辑  收藏  举报

导航