0

Trying to place the value of checkbox in inner HTML and in multiple DIVS. Seems like the code I have isn't working.

const ids = ['acc-title-placeholder-3', 'acc-title-placeholder-4', 'acc-title-placeholder-5'];
    const elements = document.querySelectorAll(ids.map(id => `#${id}`).join(', '));
    var a = cb.checked ? cb.value : ' ';
    document.querySelectorAll(elements).innerHTML = a;
frankieseattle
  • 161
  • 1
  • 10

0 Answers0