How to determine what is selected in the drop down? In Javascript.
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
Like this:
Use the
value
property of the<select>
element. For example:If your dropdown is something like this:
Then you would use something like:
But a library like jQuery simplifies things:
and then the javascript...