Make save and exit button javascript

ok i got it, thank you.

i display the answer of question by using radio button. so if user accidentally closing the tab and then user open it again the time will be continue but the question that already answered not display. can you help me?