Possible Duplicate:
Change an element’s CSS class with JavaScript
How can I change the class of <input type="submit:>
not using the id, just the class in Javascript. I have have tried this (with no luck):
function changeClass(){
document.getElementById("wpsc_buy_button").setAttribute("class", "btn btn-success");
}