Hello,

I have a <select> list in an html form with many <option>'s. How can I use JS to do different things with an onclick event based on the selected option from the <select> list (before the form is sent).

For examle, suppose there is a link after that <select> element and it has an onclick event that does some actions based on the selected option from the list. So if option with value "change_link" is selected the JS would change the href attribute of the current link, if option with value "change_title" is selected the JS would change the title attribute of the current link...


The question now is: if the form has name "form1" and the <select> element has name "list1", how can I make the JS code recognize the current selected option (its value) from the <select> list?