document.getElementById("button").className = "button_checked";

nota che solo un elemento del documento puo' avere id="button"

ciao