0
在我的應用程序,用戶可以按下「開始記錄」記錄了這個按鈕如何重播的用戶輸入與touchstart和touchend
<div class="drum" id="bass" ontouchstart="play('bass');" ontouchend="touchEnd(event);">Bass</div>
,然後保存這些信息到一個數組
[{"time":918,"elemId":"bass"},{"time":1326,"elemId":"highhat"}]
然後,我如何重播這些信息來觸發ontouchstart和ontouchend事件?基本上模仿用戶輸入。
你最好叫功能而不是僞造事件 – rupps
我該如何去做到這一點?我嘗試了一切似乎,現在只是讓人沮喪 – user3464627