简体   繁体   中英

How to control this function with the click button in java script

#one:hover{ border-radius: 200px; transition: all 5s; transition-timing-function: ease-in-out; transform: rotatey(540deg) }

I want to control this function with the javascript click. Please tells me how to call this function in javascript.

Another example on how to change the color of an element:

<h3 onclick="myFunction(this, 'red')">Click me to change my color.</h3>

<script>
function myFunction(element, color) {
  element.style.color = color;
}
</script>

source

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM