pre-select html select option after window.location redirect
问题 I have problem where after the page is redirected, I want the select to have the previously selected option as the selected choice after the page has been redirected. here I have an onchange for my select which will redirect the user depending on their selection(refresh page basically), however after the page refresh the selected option gets reset and the first option in the list get selected. $("#reportTypes").change(function () { var reportTypeID = $(this).val(); var deviceTypeID = $('