<!DOCTYPE html>
<html>
<body>
<input id="input" type="text" value="10">
<a id="btn" href="#">click me</a>
<script type='text/javascript'>
document.getElementById('btn').onclick = function() {
var input = document.getElementById('input');
input.value = parseInt(input.value) - 1;
};
</script>
</body>
</html>