Auto arrow (right) key press event?

时间:2016-02-12 19:32:38

标签: javascript keyboard-events

Is it possible to create an auto key press event? I want to flip a book once automatically after refreshing the site?

Thanks in advance!

2 个答案:

答案 0 :(得分:1)

This will do it:

$(document).ready(function() {
    var e = $.Event('keydown', { keyCode: 39 });// right arrow key
    $(document).trigger(e);
});

References:

答案 1 :(得分:0)

这解决了这个问题:

ThreadGroups

非常感谢!