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

170
Views
¿Cómo autolleno un cuadro de texto con datos en los que acabo de hacer clic con href?

ingrese la descripción de la imagen aquí Si hago clic en el remitente 'haq', ¿cómo puedo redirigir a la página de mensajes y autocompletar 'haq' en el cuadro de texto del nombre de usuario? ingrese la descripción de la imagen aquí

Mi código con el href está a continuación:

 return ( <html className="u"> <div className="form-container"> <h1 className="message-text">Inbox</h1> <table className="table-box"> <tr> <th>Sender </th> <th>Message</th> </tr> {messageList.map((val,key) => { return ( <tr> <a href = {"http://localhost:3000" + "/Message"}><td>{val.Sender}</td> </a> <td>{val.Message}</td> </tr> ); })} </table> </div> </html> );

}

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Tienes que obtener el valor del mensaje de parámetro ( Cómo hacerlo ). Luego, después de obtener el valor, asígnelo al cuadro de texto.

Ejemplo:

 // Get value of parameter in URL let example_url = "http://www.example.com/message=helloWorld"; // window.location.href let url = new URL(example_url); let message = url.searchParams.get("message") // Assign value to textbox document.getElementById("textbox").value = message;
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!