ruannawe 0 Denunciar post Postado Outubro 19, 2015 Olá pessoal, no iframe abaixo, preciso que ele apenas seja mostrado quando eu clicar em um botão qualquer. Como faço isso? <div> <iframe width="1100" height="500" id="iframe" src="https://www.google.com.br" scrolling="no" > </iframe> </div> Compartilhar este post Link para o post Compartilhar em outros sites
leonardo de andrade baessa 16 Denunciar post Postado Outubro 19, 2015 Não entendi muito bem mas; veja se algo do tipo te ajuda. http://getbootstrap.com/javascript/#modals-related-target Compartilhar este post Link para o post Compartilhar em outros sites
fchagas97 2 Denunciar post Postado Outubro 19, 2015 Seria algo como abaixo? <script type="text/javascript"> function abreIframe(){ document.getElementById('Iframe').style.display="block"; document.getElementById('buttonAbre').style.display="none"; document.getElementById('buttonFecha').style.display="block"; } function fechaIframe(){ document.getElementById('Iframe').style.display="none"; document.getElementById('buttonAbre').style.display="block"; document.getElementById('buttonFecha').style.display="none"; } </script> <button id="buttonAbre" style="display:block" onclick="abreIframe()">Abrir Iframe</button> <button id="buttonFecha" style="display:none" onclick="fechaIframe()">Fechar Iframe</button> <div id="Iframe" style="display:none"><iframe width='960' height='500' id='iframe' src='https://www.google.com.br' scrolling='no'></iframe></div> Compartilhar este post Link para o post Compartilhar em outros sites
ruannawe 0 Denunciar post Postado Outubro 21, 2015 http://pt.stackoverflow.com/questions/93341/como-fazer-que-um-bot%C3%A3o-que-chame-um-iframe Compartilhar este post Link para o post Compartilhar em outros sites