Here's a fiddle: http://jsfiddle.net/7EJGd/2/
HTML:
<input type="submit"/>
<input type="submit"/>
<input type="submit"/>
<input type="submit"/>
<input type="submit"/>
JavaScript:
var btns, i, i2;
btns = document.querySelectorAll("input[type='submit']");
for (i = 0; i < btns.length; i++) {
btns[i].addEventListener("click", function() {
for (i2 = 0; i2 < btns.length; i2++) {
btns[i2].value = "loading...";
}
});
}