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

463
Views
Cómo ocultar la URL al pasar el mouse sobre un hipervínculo

Soy mi parte de back-end de la aplicación que está integrada en PHP Symfony. Tengo archivos HTML twig, quiero cambiar el comportamiento de algún enlace href, quiero ocultar la URL en la esquina inferior izquierda después de pasar el cursor sobre ellos, probé esta solución. que necesita cambiar el texto de la URL a Contacto, pero no funcionará

 <a class="activo" href="link" onmouseover="window.status='Contact'" onmouseout="window.status=''" > Click </a>

¿alguna ayuda?

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

0

TL;RD; Simplemente use JavaScript , como:

 window.location.href = "https://stackoverflow.com";

Elimina el atributo href del elemento " <a ...> ".

Luego haz que active una función de JavaScript:

 <a onclick="myFunction()">my link</a>

Finalmente, simplemente use JavaScript para redirigir, como:

 <script type="text/javascript"> function myFunction() { window.location.href = "https://stackoverflow.com"; } </script>

Tenga en cuenta que es posible que deba agregar CSS para configurar el cursor, es decir, el CSS ya existente puede verificar la existencia de href y no aplicar una vez que se elimina href .

Reutilizando la misma función

 <a data-url="https://stackoverflow.com" onclick="myFunction(this)">my link label</a> <!-- In case you are using Twig or Blade: --> <a data-url="{{ 'https://example.com' }}" onclick="myFunction(this)">my other link</a> <script type="text/javascript"> function myFunction(element) { window.location.href = element.getAttribute('data-url'); } </script>
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!