I have built a basic script to do an elementary math add 1 on click and subtract 1 on click the problem is every time you click on the button you can watch the textbox content increase by 1 or decrease by 1 but then within a quarter of a second the form appears to reset and show the initial value of 0 again
<html>
<head>
<script>
function inc()
{
document.content.quant.value++;
}
function dec()
{
document.content.quant.value--;
}
</script>
</head>
<body>
<form name="content">
<input type="text" id="quant" value="0">
<button onclick="inc()">increase</button>
<button onclick="dec()">decrease</button>
</form>
</body>
</html>
I am sure I am making some stupid mistake - any ideas?