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

117
Views
cómo usar la función js después de usar windows.location.replace

¿Es posible ejecutar una función js \ script después de usar windows.location.replace para acceder a un nuevo sitio web?

Necesito usar el script después de que se cargue la página con los parámetros que proporciono.

Todo mi código está en un archivo html que ejecuta los scripts.

 const today = new Date()// date var month =today.toLocaleString('default', { month: 'long' });// get the month var day = today.getDate();//get the Day var hour = today.getHours();//time var month = today.getMonth() +1; var year = today.getFullYear(); var filteredURL = `the website with the parameters` sessionStorage.setItem("reloading", "true"); window.location.replace(filteredURL); window.onload = function() { var reloading = sessionStorage.getItem("reloading"); if (reloading) { sessionStorage.removeItem("reloading"); myFunction(console.log(test)); } } // function reloadP() { // sessionStorage.setItem("reloading", "true"); // document.location.reload(); // }

Cualquier ayuda será bienvenida. gracias de antemano.

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!