Question: how to keep selected value in dropdown after submit in javascript?
Answer: const mySel = document. getElementById("theIDofYourSelect"); mySel. ...  localStorage. ...  }); let val = localStorage. ...  if (val) mySel. ...  // trigger the change in case there are other events on the select. mySel.