How to do when I click button, open link in another window

1

For example this image below, I clicked the button and opened it in a small window!

    
asked by anonymous 09.10.2016 / 17:36

2 answers

2
<a href="#" onClick="window.open('pagina.html','pagename','resizable,height=260,width=370'); return false;">Clique aqui</a><noscript>Você precisa estar com o javascript ativado, caso contrário <a href="pagina.html" target="_blank">clique aqui</a></noscript>
    
09.10.2016 / 17:44
0

See this example:

<!DOCTYPE html>
<html>
<body>

<a href="http://www.w3schools.com/html/" target="_blank">Visit our HTML tutorial!</a>

<p>Se você colocar o valor do atributo "target" como "_blank", o link abrirá uma nova janela</p>

</body>
</html>

And to specify the size use Javascript

<a href="http://pt.stackoverflow.com/questions/157601/como-fazer-para-quando-eu-clicar-bot%C3%A3o-abrir-link-em-outra-janela" onClick="window.open(this.href,'pagename','resizable,height=260,width=370'); return false;">Nova Página</a>

Source OS

    
09.10.2016 / 17:43