Set the default value in dropdownlist using jQuery

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

I have many options in my dropdownlist like:


I n

相关标签:
8条回答
  • 2020-12-05 00:32
    jQuery("select#cboDays option[value='Wednesday']").attr("selected", "selected");
    
    0 讨论(0)
  • 2020-12-05 00:35
    $("#dropdownList option[text='it\'s me']").attr("selected","selected"); 
    
    0 讨论(0)
提交回复
热议问题