0
Can somebody give a full code on how to move an object inJavaScript
2 Answers
+ 8
Hint:
var a =0
function moveLeft(){
document.getElementById().style. left=a+"px"
a+=5
}
This may or may not work as you want. It is just a hint for what you want to do. You can make it as you want.
0
If you wish to animate HTML objec, you have to continually raise/lower its "x" and/or "y" attributes. For moving instantly just add/subtract from that attributes.