• Home
  • Recent Q&A
  • Java
  • Cloud
  • JavaScript
  • Python
  • SQL
  • PHP
  • HTML
  • C++
  • Data Science
  • DBMS
  • Devops
  • Hadoop
  • Machine Learning
in HTML by
Q:

What is the sessionStorage Object in HTML5 ? How to create and access?

1 Answer

0 votes
by

The sessionStorage object stores the data for one session. The data is deleted when the user closes the browser window. like below we can create and access a sessionStorage here we created “blogName” as session

<script type="text/javascript">

sessionStorage.blogName="OnlineInterviewQuestions";

document.write(sessionStorage.name);

</script>

Related questions

0 votes
asked Oct 23, 2019 in HTML by AdilsonLima
0 votes
asked Oct 23, 2019 in HTML by AdilsonLima
...