Set the selected index of a Dropdown using jQuery

后端 未结 10 800
离开以前
离开以前 2020-11-30 17:49

How do I set the index of a dropdown in jQuery if the way I\'m finding the control is as follows:

$(\"*[id$=\'\" + originalId + \"\']\") 

I

10条回答
  •  伪装坚强ぢ
    2020-11-30 18:18

    JQuery code:

    $("#sel_status").prop('selectedIndex',1);
    

    Jsp Code:

    Status:
    
    

提交回复
热议问题