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

141
Views
Alerta cuando el mouse se desplaza sobre el texto (HTML/Javascript

Así que estoy escribiendo un código que muestra un cuadro de alerta cada vez que el mouse pasa sobre un texto en HTML. El problema que tengo es que no funciona y no estoy seguro de por qué. Traté de encontrar ayuda en línea, pero ninguno de ellos funcionó. Necesito algo que no use JQuery para esta tarea. Lo que he intentado es usar la función cuando se activa con el mouse sobre el controlador de eventos, pero eso tampoco funcionó.

Este es mi código:

 function mouseOver(){ showAlert(); } function showAlert(){ alert("Alert!"); }

Este es otro método que he probado:

 function mouseOver(){ document.getElementById("text").alert("Alert!"); }
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Prueba esto

 function mouseOver(){ alert("Alert!"); }
about 4 years ago · Juan Pablo Isaza Report

0

Puedes usar esto

 document.getElementById("text").addEventListener("mouseover", function( event ) { alert("Alert!"); }, false);
 <p id="text">Hover Me</p>

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!