How can I set HTML's localStorage to an integer rather than string?
<p>I am having a problem using <code>localStorage</code> in a game I am trying to make. Also a not is the <code>money</code> variable is designed to increase by 1 every second. Here's some of my code:</p>

<pre><code>var money = 0;
window.onload = function () {
    load();
    window.setInterval(save, 2500);
};
function save(){
    localStorage.setItem("money", money);
};
function load() {
    document.getElementById("moneyText").innerHTML = localStorage.getItem("money");
};
</code></pre>

<p>My problem is that the <code>save</code> function is overriding the <code>money</code> variable every 2500 milliseconds. So I changed the <code>innerHtml</code> of the <code>moneyText</code> element to the same <code>localStorage</code> object like so:</p>

<pre><code>function load() {
    document.getElementById("moneyText").innerHTML = localStorage.getItem("money");
    money = localStorage.getItem("money");
};
</code></pre>

<p>Which does save the value. <em>However</em>, now when it increases it shows up like this:</p>

<pre><code>01
011
0111
...
</code></pre>

<p>Where as before I added that line it showed up as this:</p>

<pre><code>1
2
3
...
</code></pre>