title: Javascript Copy Text
body: <p>I want the user to be able to click a button and have certain text copied to the clipboard. I have the following code:</p>
  
  <pre><code>&lt;script&gt;
    function funcCopyXtraCode(XtraCode)
    {
      XtraCode.execCommand("Copy");
    }
  &lt;/script&gt;
  
  &lt;button onclick="funcCopyXtraCode('test1')"&gt;Copy&lt;/button&gt;
  &lt;button onclick="funcCopyXtraCode('test2')"&gt;Copy&lt;/button&gt;
  </code></pre>
  
  <p>Thanks!
  Ben</p>