'CSS display change AND redirect in a text input field

I am working on a form which should redirect the user to a different page based on what they input in the text field but I also want to display hidden div styles if they input something else. Both of these actions would only be triggered once they press continue. Can this be done? Below is the desired flow and method to recreate

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source