The object is not moving on clicking the button. Why is it so?
You should not detach style object from DOM element. Also the name of your function conflicts with native Element.animate function, name your function diffrently.
This should work:
function animateX() {
var object = document.getElementById('object');
var x = 100;
object.style.left = x + 'px';
}
#object {
position: absolute;
top: 50px;
right: 20px;
left: 20px;
height: 40px;
width: 80px;
background-color: green;
}