javascript - ZeroClipboard Implementation -


i'm using javascript analyze data locally. i'm trying implement zeroclipboard copy large html table clipboard. got sample code work in following jsfiddle. can run code web server. problem i'm having, however, exact code won't work locally in browser, used. why not work locally, , how can work? or there way copy huge html table clipboard? looking front-end solution.

below code:

<html>     <head></head>     <body>         <button id="copy-button" data-clipboard-text="copy me!" title="click copy me.">copy clipboard</button>         <script src="http://zeroclipboard.org/javascripts/zc/v2.1.6/zeroclipboard.js"></script>         <script>             window.onload = function(){             var client = new zeroclipboard( document.getelementbyid("copy-button") );              client.on( "ready", function( readyevent ) {               alert( "zeroclipboard swf ready!" );                    client.on( "aftercopy", function( event ) {                         // `this` === `client`                         // `event.target` === element clicked                         event.target.style.display = "none";                         alert("copied text clipboard: " + event.data["text/plain"] );                   });                 });             }         </script>     </body> </html> 

try removing http: script src reads <script src="//zeroclipboard.org/javascripts/zc/v2.1.6/zeroclipboard.js"></script>

also swf file on local? might problem - remember meant in same folder html or otherwise declared


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -