how to set the color of a fillrect in javascript code example Example: change fill color using javascript <button onclick="circle1.style.fill='yellow';">