After the drop-down box is selected, it jumps to a new page. How to select the option before the new page "remember"?

after selecting, you will jump to a new page. How do you choose the option before the new page "remember"?

Mar.09,2021

just save the selected value locally


I understand your question. You want to get the value selected by the user on the new page, right? If this is the case, you should pass this value as a parameter when you jump. You can use url to pass the parameter, or you can use post request to take the parameter, so that the new page can get which option the user chooses.


if there is only one choice, the page you jump to is not your choice. You don't need to write it down
/ / cpi / cloth
if the current data closes and the current tab disappears, it can be stored in sessionStorage, otherwise it can be stored in local Storage
sessionStorage.setItem ("data1", "value").
/ / undefined
sessionStorage.getItem ("data1");
/ / "value"
so you can get the data on the next page

Menu