Hallo und guten Tag,
ich habe damit bisher auch noch nicht wirklich gearbeitet, aber so funktioniert es schon mal:
<!Doctype html>
<html>
<head>
    <meta charset="utf-8">
    <script>
        if(typeof(Storage) !== "undefined") 
        {
            // Code for localStorage/sessionStorage.
            myLs = localStorage;
        } 
        else 
        {
            // Sorry! No Web Storage support..
            alert('No local storage support!');
        }
    </script>
    <title>Local Storage Objekt</title>
	
</head>
<body>
    <p id="result"></p>
</body>
<script>
    if (myLs)
    {
        if( myLs.clickcount) 
        {
            myLs.clickcount = Number(myLs.clickcount) + 1;
        } 
        else 
        {
            myLs.clickcount = 1;
        }
    }    
    document.getElementById("result").innerHTML = "You have clicked the button " + myLs.clickcount + " time(s).";
   
</script>
</html>
Das bedarf nun allerdings noch der Berichtigung und Kommentierung durch die geübten Javascriptler :-)
Grüße
TS
 nicht angemeldet
 nicht angemeldet TS
 TS Matthias Apsel
 Matthias Apsel