Set the default value in dropdownlist using jQuery

前端 未结 8 1279
盖世英雄少女心
盖世英雄少女心 2020-12-04 23:37

I have many options in my dropdownlist like:


I n

8条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-05 00:17

    This is working fine:

    $('#country').val($("#country option:contains('It\'s Me')").val());
    

提交回复
热议问题