I need assistance changing the class of all elements with the 'input' tag using the getElementsByTagName method. I am struggling to successfully modify their classes as my attempts so far have not been fruitful. Any guidance would be greatly appreciated.
var myList = document.getElementsByTagName("input");
for(i = 0; i < myList.length; i++){
//My current method is failing to work
myList[i].className = "btn btn-success";
}