Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js get selected value by id

function getSelectedValueByID(id){
    e = document.querySelectorAll("select#"+id)[0];
    return e.options[e.selectedIndex].value
}
Source by uyarilevha.com #
 
PREVIOUS NEXT
Tagged: #js #selected #id
ADD COMMENT
Topic
Name
2+2 =