Answers for "change css onclick button"

CSS
14

css onclick change color

<style>
.dabutton:focus {
    background-color:yellow;
}
</style>
<button class="dabutton"></button> // <-- usage
Posted by: Guest on July-03-2020
0

js onclick change css

<div id="foo">hello world!</div>
<img src="zoom.png" id="image" />
<script>
  $('#image').click(function() {
    $('#foo').css({
        'background-color': 'red',
        'color': 'white',
        'font-size': '44px'
    });
});
  </script>
Posted by: Guest on October-28-2021

Browse Popular Code Answers by Language