Press "Enter" to skip to content

Move, Increase Size and Change Color of an Object Using JavaScript

Here is an example to move, increase the size and change color of an object using JavaScript.

JavaScript Example to Move Object, Increase Size of an Object and Change Color

In the following example, it will create a rectangular object and three push buttons, one is to move, second is to increase the size, and the third is to change the color.

The Script for the HTML HEAD Part:

The Script for the HTML BODY part:


The output would be as shown in the featured image of this article.