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

223
Vistas
How to redirect to an html page with parameters?

I have two HTML pages running on a localhost server and would like for the first page to redirect to the other one but with parameters so that I can use queries on the second page. This is my code in javascript:

var number = 5;
window.location.href = "page2.html/?numberID=number";

So that the new page will have the URL: localhost/page2.html/?numerID=5, but code just gives me a 404 page not found error, how do I fix this?

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

You need to remove the slash between the page name and the question mark, otherwise the web server will think you are requesting a folder named /page2.html/, hence you are getting 404 - not found

localhost/page2.html?numberID=5
about 4 years ago · Juan Pablo Isaza Denunciar

0

var number = 5;
window.location.href = "page2.html?number="+number;
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