HTML 5实现手机摇一摇的功能 2015/03/17 14880 if (window.DeviceMotionEvent) { window.addEventListener(‘devicemotion’,deviceMotionHandler, false); }