Copy to clipboard using javascript(Zeroclipboard)

I tried so many ways to implement this, but found the below snippet very useful(using zeroclipboard.js) <html> <body> <script type=”text/javascript” src=”ZeroClipboard.js”></script> <script type=”text/javascript”> //set path ZeroClipboard.setMoviePath(‘ZeroClipboard.swf’); //create client var clip = new ZeroClipboard.Client(); //event clip.setHandCursor( true ); clip.addEventListener(‘mousedown’, function () { clip.setText(document.getElementById(‘box-content’).value); }); clip.addEventListener(‘complete’, function (client, text) { alert(‘copied: ‘ + text); }); //glue it […]