Pretty new to Javascript so yeah :)
Right basically I have this variable in a function:
a = document.getElementById('amnt22').innerHTML
This is a number variable, starts off at 0.10 (10 cents) and the function is called upon clicking of a button, now, I need to add 0.10 everytime the button is clicked, I've played around with all sorts, toFixed, parseInt, parseFloat etc etc all have weird results or it just doesn't work at all. Like 0.001.10 on some of them! :S
Spent hours and hours it's starting to get slightly annoying now, so basically yeah I need it to go up in increments of 0.10 so like 0.10+0.10 = 0.20 this would go on into the $1 plus... 0.10, 0.20, 0.30... 1.20 etc.
I need to set the innerHTML as it obviously so can anyone help me out!?
Thanks a lot in advance for any replies :)


Sign In
Create Account


Back to top









