Ir para conteúdo

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

ruannawe

Quero fazer que um botão chame um iframe

Recommended Posts

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

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.