Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

288
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda