Initializing hidden input's value attribute as an integer. (Javascript)
===

I'm trying to use a hidden form value as a counter for some Javascript actions. (I.e. something different will happen the second time a user clicks on a spot than the first time.) But code like:

    <input type="hidden" id="foo" value=0>

interprets the initial value as the string '0'. Is there a way to specify I want the value to be an integer, or do I just have to convert the string to an integer later?