Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

260
Visualizações
How to fetch the value of the checkbox that is stored in name array

enter image description here

As im dispalying the check boxes with buttons in UI for user to check the books that they currently using, as fivebooks array contains book name and the publication details of the book, as the user checked the allbooks[][] array will hold those checked book data

for example: allbooks[0][1,2] it contains book 1 and 2 if the user of firstlibrary(0th index) clicked check boxes of 1, and 2

as i need to fetch the allbooks[][] array and view the values

so how to fetch the array and view the values of the array

in allbooks array first index will be the library index

it means there will be morethan one library and each library has five books

i need to fetch the array and view the books that are currently checked

fivebooks array

var fivebooks = {
   "how_it_flys":1, "players_in_ground":2, "lets_Start_gaming":3, "gaming_stars":4,
   "invisible_man":5
 }
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

After generate your DOM you can for exemple

const checkboxs = document.querySelectorAll('input[type="checkbox"]');
for (var i = 0; i < checkboxs.length; i++) {
  console.log(checkboxs[i].checked);
}
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda