I have the following HTML
9995101E01#1720104405
If you want to select nth option and trigger onchange event then:
function selectOption(nr) { var select = $("select"); if (select.children().length >= nr) { let value = select.find('option:eq(' + nr + ')').val(); select.val(value).change(); } }