Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

280
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda