Never been to CodeSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

Get Selected Option Text From HTML Select List (See related posts)



var select_list_field = document.getElementById('field_id');
var select_list_selected_index = select_list_field.selectedIndex;

var text = select_list_field.options[select_list_selected_index].text;
var value = select_list_field.value;

You need to create an account or log in to post comments to this site.