DreamsCoder.com

We Code your Dreams


home > Change button color using javascript and keep it same on refresh




Change button color using javascript and keep it same on refresh







Click here for live Demo

This is a code to change the color of button on click using javascript and preserving the changes in browser local storage.

Source code



   


Note: Please remove the comments and add necessary tags 
or else click on the Source Code

Label - javascript





by - Chinmay Mahajan





Are you looking for something else?


Suggested Programs




How to Detect Ad Blocker on your website using Javascript


Drawing Prism using Three.js


Canvas Rotate Scale Translate Skew using JavaScript


Get current Date and Time automatically using JavaSrcipt


Searching Strings with indexOf and lastIndexOf using JavaScript