+ 7
GetElementBy id using variable?
pos = "bottom"; document.getelementbyid("player").style.pos Pos has to be a variable can anyone help me please?
2 Answers
+ 11
var player = document.getElementById("player");
player.style[pos] = .......
+ 1
...'player').style.position=pos;