Total new guy to HTML here.
I’m looking to create a search box that passes the typed search term into the URL field.
This is my input form:
<form name="search" action="/search/" method="post">
<input type="text" name="topic" value="">
</form>
I’d like the search term to go after the /search/ in the URL. How can this be done?
Thanks.
Use the GET form method:
EDIT:
To get the form to send the user to a url like /search//, you can use a javascript function like this:
You can then use this function as an
onClickhandler on a submit button or on the form’sonSubmit.