Click to See Complete Forum and Search --> : math variable


neil9999
08-29-2003, 06:57 AM
Hi,

The script below should add one to the button with the id 'outof'.(the variable outof is the button).At the moment it adds 1 on to the end (eg. 0, 01, 011, 0111 etc.) How do i do as described above?

else{ document.getElementById('question').value='Wrong'; document.getElementById('next').value='Next'; document.getElementById('outof').value=(outof + 1);

Thanks,

Neil

Fang
08-29-2003, 07:20 AM
document.getElementById('outof').value=parseInt(document.getElementById('outof').value)+1;