更新时间:2023-10-30 15:06:28
每当你想要的按钮被点击时的某种价值。例如:
Just pass some sort of value whenever the button you want is clicked. For instance:
ob.addEventListener("click",function() {onCl1(1)});
ob1.addEventListener("click",function() {onCl1(1)});
var i;
function onCl1(value){
i += value;
if(i == 2){
//do this
}
}
因此,基本上一旦这两个按钮被点击,该值将等于2并触发任何你想要的。
So basically once these two buttons are clicked the value will equal 2 and trigger whatever you want.