removeAttr.js 280 Bytes
Newer Older
txy committed
1 2 3 4 5 6 7 8 9 10 11
function removeAttr() {
  var list = document.querySelectorAll('[c_remove]');
  list.forEach(function(item){
    const key = item.getAttribute('c_remove');

    const removeArray = key.split(' ')
    removeArray.forEach(function(ele){
      item.removeAttribute(ele)
    })
  })
}