var dom = document.getElementById('dom'); dom.addEventListener('touchstart', onTouchStart); function onTouchStart(e) { var len = e.touches.length; if (len === 2) { console.log('双指'); } else if (len === 1) { console.log('单指'); } }