<button class="ordercolor" onclick="ordercolor()">Order Color</button>
This is the button on HTML
var color =
["#222f3e", "#dd260e", "#0ae196c", "#0ae127", "#0a7ce1", "#a60ae1", "#808000", "#00FF00", "#00FFFF", "#008080", "#FF5733"];
var i = 0;
addEventListener("click",
function () {
i = i < color.length ? ++i : 0;
document.querySelector("body").style.background = color[i];
This is the script on Java.
That script applies on every button I got on HTML and I want it specific in one button. Can you help me apply it to the specific button ? Or maybe you have another script for changing colors in order on click, like green after red after blue (always the same) ?