1// Example implementation:
2function incrementValue()
3{
4 var value = parseInt(document.getElementById('number').value, 10);
5 value = isNaN(value) ? 0 : value;
6 value++;
7 document.getElementById('number').value = value;
8}
9
10/* Example Html:
11<form>
12 <input type="text" id="number" value="0"/>
13 <input type="button" onclick="incrementValue()" value="Increment Value" />
14</form>
15*/