title: document.execCommand copy command does not work or other solution?
body: <p>What I am doing is programmatically select all text from a webpage and then copy it. The select all works with <code>execCommand</code> but copy doesn't.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>$.ajax({
      url: $('#url').val(),
      type: 'GET',
      success: function(res) {
          $('#result').html(res.responseText);
          $('#result').fadeIn('fast');
  
  
          $('#result').focus();
          $('#result').select();
  
          document.execCommand('selectall');
  
          // copy does not work ?
          document.execCommand('copy');
  
      }
  });
  </code></pre>
  
  <p><strong><a href="http://jsbin.com/welcome/72426" rel="nofollow">Here is Example on JsBin</a></strong></p>
  
  <p>I also tried using flash solution such as <a href="https://github.com/jonrohan/ZeroClipboard" rel="nofollow">ZeroClipboard</a>, however it seems that one has to press their flash object/button <em>explicitly</em> to copy text whereas I wanted to do <code>zeroclip.setText('whatever');</code> <strong>without user's pressing</strong> the button.</p>
  
  <p>Can anyone tell how to copy text programmatically? </p>