your code is illegal: two controls may not possess the same value for their id attribute, as all IDs must remain unique within the document.

if you must, use the name attribute to group controls, as it does not need to be unique.

what you want to do is certainly possible, but not necessary, as you may accomplish the same by passing 'this', as in '...onclick="SubtractOne(this)" ', where the entire tag itself is passed to the javascript function. the function may then retrieve the id from the object itself. Observe: