Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

162
Views
¿Cómo ejecuto querySelector al revés?

En un documento, hay 2 elementos con el nombre de clase "div._13NKt.copyable-text.selectable-text". (Es web.whatsapp.com)

Uno en la parte superior del documento, uno en la parte inferior del documento.

Me gustaría consultar Seleccione el segundo elemento / el elemento en la parte inferior.

¿Cómo podría hacer esto?

¿Hay alguna opción para hacer una consulta Seleccionar al revés?

Aquí está mi código hasta ahora:

 document.querySelector("div._13NKt.copyable-text.selectable-text").focus();

Estoy ejecutando este comando usando el navegador web mobileFX basado en Chromium.

Yo lo llamo así:

 webkit1.Eval("document.querySelector(" & Quote("div._13NKt.copyable-text.selectable-text") & ").focus();")
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

¿Algo como esto?

 const elements = document.querySelectorAll("div._13NKt.copyable-text.selectable-text"); if(elements.length) elements[elements.length - 1].focus();
about 4 years ago · Juan Pablo Isaza Report

0

Creo que puede usar document.querySelectorAll("div._13NKt.copyable-text.selectable-text") y luego acceder al índice.

 //Capture the elements let myVar = document.querySelectorAll("div._13NKt.copyable-text.selectable-text"); //Then access to the index, taking into account that the initial index is 0. console.log(myVar[1]) //Or var secObject = myVar[1];
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!