Simulate javascript to choose from dropdown
问题 I am trying to simulate a javascript to choose from the dropdown list below. I am trying this code here but its not working. $('select[name="srctype"]').val(2).trigger('change'); Am i doing something wrong here? Is my javascript messed up for this layout of code below? I am trying to choose value="single" <select name="srctype" class="formselect" onchange="typesel_change()"> <option value="any" selected="selected">any</option> <option value="single">Single host or alias</option> <option value