<script>
function openWindow(){
setTimeout(function(){window.open('https://google.com.br/');},1000); // abre o link
setTimeout(function(){window.open('https://youtube.com/');},3000); // abre o link
setTimeout(function(){window.open('https://facebook.com/');},5000); // abre o link
setTimeout(function(){openWindow.close();},2); // fechar link
}
</script>
<a href="#" onclick=openWindow() > teste </a>
Alguém poderia ajudar, creio q na hora de fechar não estou fzd certo. Sou novo em js. A função de fechar não tá fechando os link, poderiam ajudar..
<a href="#" onclick="javascript:a=window.open('/', 'width=100, height=100'); setTimeout('a.close()',3000); return false"
> pop up </a>
preciso de um código parecido, mas ao clicar abra um link, feche com um tempo, e execute outro link, e assim por diante. Sou muito grato pela ajuda :)