Horje

Example of HTML Web Storage API

index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>
 <div id="result"></div>
 <script>
  if(typeof(Storage)!=="undefined") {
   document.getElementById("result").innerHTML = "Hey, Your browser supports the Web Storage.";
  }
  else{
document.getElementById("result").innerHTML = "Sorry, your browser does not support Web Storage";
  }
</script>
</body>
</html>

Output should be:

Example of HTML Web Storage API




Type:
html
Category:
Web Tutorial
Sub Category:
HTML Web Storage API
Uploaded by:
Admin