Answers for "option selected"

0

jquery option selected

$('.selDiv option:eq(1)').prop('selected', true)
Posted by: Guest on October-01-2020
0

option selected aotu value

$(document).ready(
    function(){
        var theValue = $('#myId').val();
        $('option[value=' + theValue + ']')
            .attr('selected',true);
    });
Posted by: Guest on October-19-2020

Browse Popular Code Answers by Language