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

290
Visualizações
How to find the id of the html while looping through <tr> in javascript/jquery

I'm working on a queue management page where we have multiple Html tables on a single page and each table holds 10 values including name and image, now I wanna remove a row from the table when the present button is pressed and I did it using this following code

function removePresent() {
               
    const urlParams = new URLSearchParams(window.location.search);
    const HallNo = urlParams.get('hallno');
    const TvIP = urlParams.get('tvip');

    $.ajax({
        url: '@Url.Action("PresentDisplayRemover")',
        type: "GET",
        data: { 'HallNo': HallNo, 'TvIP': TvIP },
        contentType: "application/json",
        success: function (response) {

            $.each(response, function (j, e) {
                const rows = Array.from(document.getElementsByTagName('TD'));
            $.each(rows, function (i) {
                if ($(rows[i]).text() === e.StudentId) {
                    $(rows[i]).parent().remove();
                }
            });
        }
   });
}

Now my flow also requires me to find the Id of the matched to increment a counter, I have no idea how to do it and I also tried searching online but I ended up finding nothing,I'm relatively new to js and jquery since my main workflow only consists of me working with .NET so any help would be great, Thank You.

about 4 years ago · Juan Pablo Isaza
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