Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

279
Visualizações
How to create single link which will open random link from multiple link

I have 5 different website links. Of the five links, I want to make 1 link which when I click on the link it will automatically open 1 particular website out of 5 website links that I have. I've tried using the script, but I don't know how to create a link from the script.

The script opens the link in a new tab. But to do that I have to include the script in the web page and other people have to open the web page first before they can click the script button. What I want is to create a link so I can pass it on to others without having to open the website first

Can anyone provide a solution?

<script type="text/javascript">
var urls = new Array();
urls[0] = "a.com";
urls[1] = "b.com";
urls[2] = "c.com";
urls[3] = "d.com";
urls[4] = "e.com";
var random = Math.floor(Math.random()*urls.length);
window.location = urls[random];
</script>

enter image description here

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

If you want to only pass a link, you need to create a web server that you can give the link to and the web server will redirect to one of those links.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda