Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis+ 2
Border
I canāt change the border of an object at all in JavaScript. var elem = document:getElementById(āexampleā) elem.style.borderWidth = ā10pxā elem.style.borderColor = ā#FFFā Iāve tried changing it around so many ways and it still didnāt work. (I also tried doing rgba and it didnāt work at all, does it work differently on border?)
5 Respostas
+ 4
what i have seen from your codes.
you have forgotten to add semicolon (;) after every statement
ie.
var elem = document:getElementById(āexampleā);
elem.style.borderWidth = ā10pxā;
elem.style.borderColor = ā#FFFā;
+ 3
@Norberttony share your complete code š
.
0
or just do elem.style.border="5px solid black";
kill two birds with a stone
0
I have tried ending every statement with ;
But it still didnāt work...
I tried doing elem.style.border as well, and it didnāt work either.
0
Shoot, now my for statement doesnāt work...
for (a = 1; a <= planets; a++){ //planets is equal to 2
var pl = newplanet() //Generates new planet
alert(a) //Alerts a, output is 201 <ā- How is output 201??
game["p" +(a)] = pl //Not important
}