How can I determine the value of the selected dropdown option using getElementsByClassName?
问题 How can I determine the value of the selected dropdown options using javascript. I can't use id selector so I was trying with document.getElementsByClassName. I understand that returns a set of values. Here is a simplified code I am trying to use: <div id="MDL" class="dates"> <p>Select Dates and Price</p> <select class="datevalue"> <option value="30">17th July - £30</option> <option value="45">17th July - £45</option> <option value="70">17th July - £70</option> <option value="30">18th July -