How can I make that when an option from dropdowna <select> list is selected, the value of that option be displayed into a Div.
I have this html code, with the list of options and the Div tag:
<select id='drink'>
<option value=''>Which drink would you like?</option>
<option>Latte</option>
<option>Capuccino</option>
<option>Americano</option>
<option>Tea</option>
</select>
<div id='output'></div>
MarPloPosts:186
You have to start with a <select> element which raises a 'change' event when an option is selected.
Inside that event, 'this.value' refers to the selected value.