I have retrieved this code from http://www.steamdev.com/zclip/.
When I tried the sourcecode it doesn't work and I cannot find the root problem that I can't use the source code in local computer.
Thanks!
<!DOCTYPE html> <html> <head> <title></title> <script src="https://code.jquery.com/jquery-1.11.3.min.js"></script> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/jquery.zclip.js"></script> </head> <script> $(document).ready(function(){ $('a#copy-description').zclip({ path:'js/ZeroClipboard.swf', copy:$('p#description').text() }); // The link with ID "copy-description" will copy // the text of the paragraph with ID "description" $('a#copy-dynamic').zclip({ path:'js/ZeroClipboard.swf', copy:function(){return $('input#dynamic').val();} }); // The link with ID "copy-dynamic" will copy the current value // of a dynamically changing input with the ID "dynamic" }); $(document).ready(function(){ $("a#copy-callbacks").zclip({ path:'js/ZeroClipboard.swf', copy:$('#callback-paragraph').text(), beforeCopy:function(){ $('#callback-paragraph').css('background','yellow'); $(this).css('color','orange'); }, afterCopy:function(){ $('#callback-paragraph').css('background','green'); $(this).css('color','purple'); $(this).next('.check').show(); } }); }); </script> <body> <textarea id="text-to-copy" onfocus="if(this.value=='Type your text here.')this.value='';" onblur="if(this.value=='')this.value='Type your text here.';" style="margin: 0px -59px 15px 0px; height: 240px; width: 438px;"> Type your text here. </textarea> <a id="copy-button" href="#" class=" hover">Copy</a> <textarea onfocus="this.value='';"> Paste text here to verify. </textarea> </body> </html>