How does js use one onclick event to call more than two methods

//用分号隔开即可:
 function x(){
    
    
   alert(x); 
  }
  function y(){
    
    
   alert(y); 
  }
  function z(){
    
    
   alert(z); 
  }
  
<input type="button" οnclick="x();y();z()" value="xyz"/>

Guess you like

Origin blog.csdn.net/weixin_45402023/article/details/109274593