简体   繁体   中英

Javascript based Tabs - on page reload data is lost

I am using a Tab based layout, which has 5 Steps with different input fields for each step. and if user on step 4 page reloads then start the complete process from step1 agaig. Is there any possibility to remain on step 4 after reploading the page

Use localStorage to store your information collected so far. If a reload happens, first check, whether any data has already been entered and if so fill in the appropriate elements and redirect the user to the first "unfinished" tab.

localStorage Docu @ MDN

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM