Use Javascript to copy Text from Label
<p>Label1 (asp.net control) is located inside Panel1 of my webpage and I have a button called bt.  What is the Javascript to copy the Text from Label1 to the clipboard?</p>

<p>Thanks,</p>

<p>@ artlung, I placed the below code just outside of my form but inside the body.  The last line of code I placed inside Panel1 of my form.  Anything wrong with this code because nothing happens when I click the Copy to Clipboard button.</p>

<pre><code>&lt;script language="JavaScript"&gt; 
                    var clip = new ZeroClipboard.Client(); 
                    clip.addEventListener( 'mouseDown', function(client) {  
                            // set text to copy here 
                            clip.setText( document.getElementById('form1.Label1').value ); 

                            // alert("mouse down");  
                    } ); 

                    clip.glue( 'd_clip_button' ); 
            &lt;/script&gt; 
</code></pre>

<p>The next line of code is above the script tags but inside Panel1 in my form</p>

<pre><code>&lt;div id="d_clip_button"&gt;Copy To Clipboard&lt;/div&gt;
</code></pre>
