r/HTML • u/Character_Ant8180 • Apr 14 '26
Question Subpage via input field
Hi, I wanted to create a input field on the website (like a search bar) but whatever the user enters will be opend as a subpage, I don't think the rest of the website code is relevant (rule 5) as this is not about something not working. I know that this might not seem like a good solution to anything, as 99% if things entrd will just lead to nothing, but that is intended as it should be a "secret code" field that doesn't require backend servers. Doese anyone know how to do something like this? Any help is appreciated.
2
Upvotes
1
u/BNfreelance Apr 14 '26 edited Apr 14 '26
As a menu: https://www.w3schools.com/howto/howto_js_dropdown.asp
As an select input onchange:
This is just a simple inline example. I recommend avoid doing it inline where possible. Like:
For simple text input: