javascript - How to trigger Ctrl+C key event with jQuery? -
i want simulate ctrl+c copy text page. first tried this:
$('#codetext').click( function() { $("#codetext").trigger({ type: 'keydown', which: 99 }); }
html:
<input type='text' id='codetext'>
i have tried using $(this)
instead of selector, input element has focus on it, doesn't run.
check out zeroclipboard... think works, haven't tested it.
Comments
Post a Comment