title: Create a Copy Button Without an Input Text Box
body: <p>I need some JavaScript to make some text to copy your clipboard when you click a button. I have attached the button HTML below. Note: I have more than one button.</p>
  
  <pre><code>&lt;button id="TextToCopy"&gt;&lt;img src="button_image.png" onclick="ClipBoard(this)"&gt;&lt;/button&gt;
  </code></pre>
  
  <p>I was thinking about doing an if statement like this for each button but don't know what to do to copy the text.</p>
  
  <pre><code>    function ClipBoard(x) {
  if (x.id == "TextToCopy")
  var copyText = "TextToCopy";
  </code></pre>