如何在select中获取title属性的当前值?

如何在select中获取title属性的当前值?,select,title,Select,Title,试一试 这在我的情况下起了作用: ... var get_val = $('#select_id>option:selected').attr('title'); $("#new_value").text(get_val); //$new_value: I want to here the value of the selected option's title ... $("#btsend").click(function (e) { var get_val = $("#sel

试一试


这在我的情况下起了作用:

...
var get_val = $('#select_id>option:selected').attr('title');
$("#new_value").text(get_val); //$new_value: I want to here the value of the selected option's title
...
$("#btsend").click(function (e) {
    var get_val = $("#select_id").val($(this).find("option:selected").attr("title"));
    $("#new_value").val(get_val); //$new_value: I want to here the value of the selected option's title
    });
...
var get_val = $('#select_id>option:selected').attr('title');
$("#new_value").text(get_val); //$new_value: I want to here the value of the selected option's title
...
var data1 = $('#select_id>option:selected').attr('title');
$("input#city").val(data1);