adding multiple event listeners to one element

后端 未结 14 1441
夕颜
夕颜 2020-11-27 13:12

So my dilemma is that I don\'t want to write the same code twice. Once for the click event and another for the touchstart event.

Here is the original co

14条回答
  •  一生所求
    2020-11-27 13:37

    //catch volume update
    var volEvents = "change,input";
    var volEventsArr = volEvents.split(",");
    for(var i = 0;i

提交回复
热议问题