0
http://www.ivangabriele.com/cordova-detecting-shaking/如何計算使用javascript檢測到的震動次數
我正在學習在javascript中編寫抖動函數。但我不知道如何檢測和統計用戶所做的震動次數,任何人都可以幫我一把嗎?
shake.startWatch(onShake);
function onShake()
{
alert('Shook');
}
// Stop watching for shaking event
shake.stopWatch();