Wednesday, 7 October 2020

Basic LocalStorage Full Code Test

PAGE 1

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <input id="qweInputed" value=""><button onclick="qweclick()">Save Me</button>
    <button onclick="qweRemove()">Remove</button>
    <script>
        function qweclick() {
            var getInput = document.getElementById("qweInputed").value;
            alert(getInput + " success");
            localStorage.setItem("qweStorage"getInput);
        }

        function qweRemove() {
            alert("remove succeed");
            localStorage.removeItem("qweStorage");
        }
    </script>
</body>

</html>


PAGE 2
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="loadStorage"></div>
    <script>
        window.onload = alert(localStorage.getItem("qweStorage"));
        window.onload = document.getElementById("loadStorage").innerHTML = localStorage.getItem("qweStorage");
    </script>
</body>

</html>

email mailto: pretext

 <a href="mailto:designoutsourced.com+info@gmail.com?subject=Maklumat%20lanjut%20pakej&body=Hai,%20saya%20berminat%20tahu%20lebi...