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

182
Views
¿Cómo abrir el enlace desde iframe en una nueva pestaña?

Tengo un enlace, y cuando hago clic en el botón, lo redirijo con la ayuda de un evento a otra página.

 <div id="link"><a href="javascript:void(0);">Redirect</a></div> function redirectFromIframe() { window.top.location.href = "some_link" } let link = document.getElementById("link"); link.addEventListener("click", redirectFromIframe, false);

Todo funciona bien, pero si queremos abrirlo en una nueva pestaña, debemos usar el siguiente código, ya que no podemos usar target_blank porque el enlace está anulado

 window.open('some_link', '_blank');

Entonces, ¿cómo podemos usar el enlace desde iframe y al mismo tiempo abrir en una nueva pestaña?

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!