forms - Call key press with javascript -
i trying press tab , enter key through javascript/jquery on page load.
like:
if(event.keycode == 13){ $("#submit").click(); }
this work when user presses enter key want javascript stuff user on page load.
you can simulate keypress code:
function simulatekeypress(character) { jquery.event.trigger({ type : 'keypress', : character.charcodeat(0) }); }
thanks thread: is possible simulate key press events programmatically?
but ghyath serhal pointed out, there might better way simulate keypress catch same code.
Comments
Post a Comment