Need HTML or Java or CSS help?

Lewis

New member
I want to have a text box that you insert numbers into, and I need 2 push buttons, one that once clicked makes the numbers higher, and two once clicked makes the numbers lower.
I would really appreciate any help.
@ Chris B, thanks, I tested it, cannot get it to work.
Thanks a lot, best answer.
 
<html>
<head>
<script>
function increase(){
numbox = document.getElementById('num');
num = numbox.value;
num++;
numbox.value = num;
}

function decrease(){
numbox = document.getElementById('num');
num = numbox.value;
num--;
numbox.value = num;
}
</script>
</head>
<body>
<input type='text' id='num' /> <input type='button' value='Increase' onClick='increase()' /> <input type='button' value='Decrease' onClick='decrease();' />
</body>
</html>

Good Luck!
If you need further assistance/advice, feel free to contact me.

EDIT: Yes i know, which is why i took it off so fast - i made a careless mistake and place a definer outside the function.
 
Back
Top