var cookieValue = document.getElementById("demo");
var value = cookieValue .getAttribute('value');
if(typeof(Storage)!=="undefined")
{
alert(value);
localStorage.setItem = ("GetData" , value);
alert(localStorage.setItem);
}
function loading()
{
alert("coming");
var allcookies = localStorage.getItem('GetData');
alert(allcookies);
}
上記は私が設定localStorage.setItem
している方法で、LocalStorage を取得しています。しかし、出力が得られなかった場所では、Null が表示されています。解決策を教えてください。