Custom dropdown list

Here is a self-explanatory example that shows you how you can impact other elements on your page when changing the selected item from a dropdown list, as well as how to change your selection with external calls.

HTML Example:




Result:



The onChange event associated with a <select> tag allows you to change the status of various other page elements. In the above example, we changed the text inside a regular text box.

In the second example, the onClick event triggers associated to each of the two buttons change the selected value of the drop down list.

Share

Learn how to design amazing websites