Я хочу получить значение "value", но я получаю Undefined.
HTML:
<select id="myId">
<option value="red">1235</option>
<option value="green">7845</option>
</select>
jQuery (part):
$('select').change(function(){
var value = $(this).val();//it's ok with the text(1235...)
var nameQ=$(this).attr("value");//Here is the problem I want to get red or green
alert(nameQ);
});