-1
links = new Array("<www.google.com","https://www.youtube.com/","portal.trademap.com.br");
tamanho = links.length;
nRand = Math.floor((Math.random() * tamanho ));
document.write ("<p><a href='"+links[nRand]+"' > BOTÃO </a></p>");
-1
links = new Array("<www.google.com","https://www.youtube.com/","portal.trademap.com.br");
tamanho = links.length;
nRand = Math.floor((Math.random() * tamanho ));
document.write ("<p><a href='"+links[nRand]+"' > BOTÃO </a></p>");
1
To open a link in a new tab just add the property target="_Blank"
document.write ("<p><a target='_blank' href='"+links[nRand]+"' > BOTÃO </a></p>");
Browser other questions tagged javascript url random aba
You are not signed in. Login or sign up in order to post.