Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

154
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda