javascript - Saving an Incremental Game Locally -


i'm trying incremental game save cookies/data locally, not sure how it.. here's html , javascript.

javascript:

    savegame() = function() {     saveservice.savegame();     }      resetgame() = function() {     localstorage.clear();     } 

html:

                    <section><center>                         <p>the game auto-saves every 30 seconds, in case in hurry, use this:</p><br />                         <a class="button12" ng-click="savegame()"/>save game</a>                         <br /><br />                     </center></section>                         <hr>                     <section><center>                         <p>this <strong>permanently</strong> reset game (refresh after press it):</p><br />                         <a class="button12" ng-click="resetgame()">reset game</a>                         <br /><br />                     </center></section> 

in addition saving game, want able have game able reset. how well?


Comments

Popular posts from this blog

C# random value from dictionary and tuple -

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -