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

270
Views
Establecer selección para un <p> en Javascript

tengo un código de ejemplo aquí (de w3schools):

 <!DOCTYPE html> <html> <body> <p>Click on the button to copy the text from the text field. Try to paste the text (eg ctrl+v) afterwards in a different window, to see the effect.</p> <input type="text" value="Hello World" id="myInput"> <button onclick="myFunction()">Copy text</button> <script> function myFunction() { /* Get the text field */ var copyText = document.getElementById("myInput"); /* Select the text field */ copyText.select(); copyText.setSelectionRange(0, 99999); /* For mobile devices */ /* Copy the text inside the text field */ navigator.clipboard.writeText(copyText.value); /* Alert the copied text */ alert("Copied the text: " + copyText.value); } </script> </body> </html>

Seleccionará la entrada: ingrese la descripción de la imagen aquí

Pero cuando debo seleccionar una etiqueta <p> como esta: ingrese la descripción de la imagen aquí ¡Gracias por la ayuda!

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