+ 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 Answers
+ 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
}