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

114
Visualizações
Added aditional part of url after search form

I found form for search button overhere but I need added in url aditional text after search form input. For example url is www.111.com/search/static/

We need to replase "search" from form text below & added /static/ part in url after

<form onsubmit="window.location = 'https://111.com/' + search.value; return false;">

<input id="search" placeholder="Search" type="search" name="search"></input>
<input type="submit" value="Send">
</form>

I need replase "search" for text inputed in form

For example we put in form "12345" our url must be https://111.com/12345/static

if we put 5678 it will be https://111.com/5678/static

thx

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

(Answer edited after clarification from vasya vasya.)

If I got it right this time, you have a "template" URL like https://111.com/search/static/. And you want the term search to be replaced by the actual search string, like the example in your comment.

To do so, you would use:

<form onsubmit="window.location = 'https://111.com/' + document.getElementById('search').value + '/static'; return false;">

The getElementById accesses the input element via its id attribute and then the value function returns the text entered.

about 4 years ago · Juan Pablo Isaza Relatório
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