Home » HTML » Html miscellaneous » Question
  1. In sessionStorage object data __________.
    1. is deleted after the browser has been closed
    2. can be seen as well as edit
    3. can be seen but can’t edit
    4. is not deleted after the browser has been closed
    5. None of these
Correct Option: A

sessionStorage object works same as localStorage object except the data is stored for one session only. When the use closes the browser the data is deleted. Syntax is

sessionStorage.firstname-“Tanya”; document.getElementById(“fo”).innerHTML= sessionStorage.firstname;



Your comments will be displayed only after manual approval.