+ 1
add Attributes JavaScript
How can i add to all elements with the className "digit" the attribute r="2.5px"? -> https://code.sololearn.com/W27JVf29KuFV/#html <-
3 ответов
+ 1
sorry i made a mistake that's why i remove first answer
check this:
https://code.sololearn.com/WjlRGHz2GYce/#html
+ 1
That worked:
window.onload = function (){
var digits= document.getElementsByClassName("digit");
for (i = 0; i<digits.length; i++)
digits[i].style.r = "2.5px";
}
+ 1
Thank you both 😀 you helped really much