Friday, June 21, 2024

button color chage using javascript example

Javascript Task

How can I create an HTML button that, when clicked, triggers a Javascript function, and changes the button's color to red with each successive click?

Tips: use document.getElementById().style.backgroundColor

No comments:

Post a Comment

Change H1 text using buttons dynamically Javascript Sourcecode

Javascript Task How can i make it so that when a user clicks a button, the text from that button is shown...