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

74
Visualizações
Iframe with js random display imagenot working

guys pls help to fix this. I need to add a random image refreshing when using iframe.try tried my best to find solution but it's not worked.pls help me to fix this.

here is my html

<iframe class="img-responsive center-block element-spacing-md" id="banner" width="970" height="250" frameborder="0" scrolling="no" allowfullscreen="true" style="width: 970px; height: 250px;" ></iframe>

here is the js

var imagee = new Array ();
    imagee[0] = "//s0.2mdn.net/dfp/370694/4408939339/1629903098931/index.html";
    imagee[1] = "//s0.2mdn.net/dfp/370694/4823240283/1652207585517/index.html";
    imagee2] = "//s0.2mdn.net/dfp/370694/4823240283/1652207585517/index.html";
    var size = imagee.length
    var x = Math.floor(size*Math.random())

    $('#banner').attr('src',imagee[x]);

$('#refresh').click(function() {
    location.reload();
});

codepen-https://codepen.io/mithun-deshan/pen/VwQozrQ

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