I have the following HTML
<select onchange="this.form.submit()" name="name"> <option value="9995101E01#17201044055PM">9995101E01#17201044055PM</option> <option value="GRR-Example">GRR-Example</option> <option value="admin">admin</option> <option value="123w">123w</option> </select>
May I know how I can use JQuery to option with value "admin"?
$('select[name=name] option:eq(2)').attr('selected', 'selected');
Demo.
2.1m questions
2.1m answers
60 comments
57.0k users