Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

192
Views
Estoy tratando de hacer una ventana emergente que aparece en una posición aleatoria en la pantalla, pero termina en el mismo lugar cada vez.

Aquí está el bucle

 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>");

Esta es la función "aleatoria" a la que llama

 function random(min, max) { // min and max included return Math.floor(Math.random() * (max - min + 1) + min) }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!