I am a beginner in HTML programming and I have the following question. Im working on a simple try-out.
I have following selection menu:
<p>Kies de frisdrank:</p>
<select id="frisdrank">
<option value="Cola"> Cola </option>
<option value="Fanta"> Fanta </option>
<option value="spuitwater"> spuitwater </option>
<option value="chocolademelk"> chocolademelk </option>
</select>
I also have a button:
<input id="OK" type="button" value="OK">
Now how do I display a text somewhere or a label that says what option is selected when I press the button? I understand this is very basic but still I cant handle to do this.
** UPDATE!!! **
Thanks everyone already for the help! Now I figured out how to do this. Here is my followup question : Can I add another textfield with a matching price? Like if you select Cola then the price is for example 20. And If you select fanta the price is 25?
I figured out the javascript. I already have a little bit experience with normal Java.
Thanks for helping me out!