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

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -