Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

145
Visualizações
evento desencadenante al llegar a la parte inferior del iframe desplazándose

Estoy tratando de insertar un evento de desplazamiento en un IFRAME en código HTML, para activar un evento cuando el usuario haya desplazado el sitio/documento hasta el final.

Encontré varias sugerencias sobre "stackoverflow" e intenté usarlas, pero por alguna razón, el código que inserté no funciona.

este es un ejemplo de mi código:

 <!DOCTYPE html> <html> <body> <p>Click the button to change the value of the src attribute in the iframe.</p> <input type= "url" id="hi" value = "hello" onchange="myFunction2()"> <button onclick="document.getElementById('myFrame').src = document.getElementById('hi').value;" id=getFile >Upload File</button></br></br> <iframe id="myFrame" src="https://agilepoint.com/"></iframe> <p id="demo"></p> <script> window.onscroll = function(ev) { var Frame = document.getElementById("myFrame"); if ((Frame.innerHeight + Frame.scrollY) >= document.body.offsetHeight) { alert("you're at the bottom of the page"); } }; </script> </body> </html>

También probé esto:

 <!DOCTYPE html> <html> <body> <p>Click the button to change the value of the src attribute in the iframe.</p> <input type= "url" id="hi" value = "hello" onchange="myFunction2()"> <button onclick="document.getElementById('myFrame').src = document.getElementById('hi').value;" id=getFile >Upload File</button></br></br> <iframe id="myFrame" src="https://agilepoint.com/"></iframe> <p id="demo"></p> <script> document.getElementById("myFrame").onscroll = function(ev) { var Frame = document.getElementById("myFrame"); if ((Frame.innerHeight + Frame.scrollY) >= document.body.offsetHeight) { alert("you're at the bottom of the page"); } }; </script> </body> </html>

No funcionó. Agradecería la ayuda. ¡Gracias!

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda