I want to get the last selected <option> in a <select multiple> in javascript not jquery!
The last selected option means the last option selected by the user. Not that the last option element in the select element!
I try:
<select multiple="multiple" onchange="changeEvent(this)">
function changeEvent(selectTag) {
console.log(selectTag.value);
}
I expected to get the last <option> selected