Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <body> <div id="result"></div> <script> // Check browser support if (typeof(Storage) != "undefined") { // Store localStorage.setItem("lastname", "Smith"); // Retrieve document.getElementById("result").innerHTML = localStorage.getItem("lastname"); } else { document.getElementById("result").innerHTML = "Sorry, your browser does not support Web Storage..."; } </script> </body> <!-- Mirrored from www.w3schools.com/html/tryit.asp?filename=tryhtml5_webstorage_local by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 07:20:58 GMT --> </html>
Result:
Try it Yourself - © w3schools.com