根据两个class绑定同一onclick事件

$startBtn.add($againBtn).on("click", function (e) {
            e.preventDefault();
           //对应处理代码
          startGame();
});

  

猜你喜欢

转载自www.cnblogs.com/bokeTing/p/12054139.html