[Solved] Find input value of a class with distinct id?


The HTML you posted is not formatted so hard to decipher but, for the general case, you could do:

let ids = [];
let els = document.getElementsByClassName('state')
for (let i = 0; i < els.length; i++){
    ids.push(els[i].id);
}

2

solved Find input value of a class with distinct id?