Skip to content
Advertisement

Show input field only if a specific option is selected

I’m trying to make a form which checks if a certain option is selected from a “select” tag. Here is my current HTML:

JavaScript

This is the div element which should become visible after “Muu” is selected:

JavaScript

And here is the JavaScript I’m trying to use:

JavaScript

But it’s not working…

Advertisement

Answer

here you go:

JavaScript
JavaScript
Advertisement