update same variable by multiple files
<p>I have 4 html page, page1-4. And global variable stores in js file, i want to update the variable by click yes/no on each of the webpage.
Is there a way to keep the variable ? e.g. store in webrownser or harddisk ?</p>

<pre><code>&lt;head&gt;
    &lt;script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="js/counter.js"&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;h1&gt;Are u in?&lt;/h1&gt;
    &lt;!--img tag--&gt;
    &lt;div id="yes"&gt;
        &lt;input type="button" name="yes" value="Yes"&gt;
    &lt;/div&gt;
    &lt;div id="no"&gt;
        &lt;input type="button" name="yes" value="No"&gt;
    &lt;/div&gt;
    &lt;script type = "text/javascript"&gt;
            $("#yes").click(function() {
                count = 1; //page2 will getC() and count += 2 and setC(count)
                setC(count);
                window.location.replace("page2.html");//maybe this will clear out something
            });
            $("#no").click(function() {
                window.location.replace("page2.html");
            });
    &lt;/script&gt;
&lt;/body&gt;
</code></pre>

<p>------------js file------------------</p>

<pre><code>var count;

function setC(c){
    count = c;
}
function getC(){
    return count;
}
</code></pre>
