var SHAKE_THRESHOLD = 800;//摇动强度 var lastUpdate = 0; var x, y, z, last_x, last_y, last_z; var canshake = false; function deviceMotionHandler(eventData) { var acceleration = eventData.accelerationIncludingGravity; var curTime = new Date().getTime(); i