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

198
Vistas
I am trying to make a popup window that pops up in a random position on the screen, but it ends up in the same spot every time?

Here is the loop

for (let i = 0; i < 13; i++) {
  var randomval =  random(0, screen.height)
  var myWindow = window.open("", ("MsgWindow", i), "width=200,height=100,top=0, left=random(0, screen.width)");
  myWindow.document.write("<p>TROLOLOLOLOLOLOLOLOL</p>");

This is the "random" function it calls to

function random(min, max) { // min and max included
  return Math.floor(Math.random() * (max - min + 1) + min)
}
about 4 years ago · Juan Pablo Isaza
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