简体   繁体   English

java脚本中的点击按钮如何控制这个function

[英]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.我想通过点击 javascript 来控制这个 function。 Please tells me how to call this function in javascript.请告诉我如何在 javascript 中调用这个 function。

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来源

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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