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

166
Vistas
How to make a functional search engine with javascript inside an own html page?

I have a page with several sections on different pages as word concepts, and I want to implement a search engine so that the user searches for the word, when clicking it redirects it to another page with the results and another option that redirects it to a page with the word what are you looking for

This is my code

HTML

<input class="form-control me-2" type="search" placeholder="Write..." id="text" aria- 
label="Search" required>
<button class="btn btn-outline-success" onclick="Search();">Search  <i class="fas fa-search"> 
</i></button>

Javascript

function Search(text){
var text = document.getElementById("text").value;
if (texto == "a"){
    window.location.assign("results.html");
}else if (text == "azure"){
    window.location.assign("azure.html");
}else
no results
}
}

I am not sure if the search engine is dynamic as I am proposing with this code, I have consulted other sites and they have told me that it is not recommended this way with this code, so if there is a possibility with another code or if there is any error with this, please help me ...

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