HTML
Vue:<button type=“button” @click=“a();b()”>vue按钮
React:<button type=“button” onClick={function(event){ a(); b()}}>react按钮
听说现在比较流行ES6?
React:<button type=“button” onClick={(event) => { a(); b();}}>react按钮
js
methods:{
a(){
console.log(‘a’);
},
b(){
console.log(‘b’);
}
}
原作者:非凡主力
来源:CSDN
原文:https://blog.csdn.net/feifanzhuli/article/details/78092715
版权声明:本文为博主原创文章,转载请附上博文链接!