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

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

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