title: How to put url into variable when button clicked
body: <p>I've tried several things for days... so i whittled this down to save time...
  I want to click the CopyQQ button, and have the url... ex <a href="https://www.TestURL.com/pt/595564" rel="nofollow noreferrer">https://www.TestURL.com/pt/595564</a> copied into a var.  see code below...<br />
  I realize that I need to somehow use the e.target, but beyond that, (as a newby to js), I'm just now quite sure how to grab the url field that i need...</p>
  <pre><code>&lt;!doctype html&gt;
  &lt;head&gt;
    This is head&lt;br&gt;
  &lt;/head&gt;
  &lt;body&gt;
    This is body&lt;br&gt;
  
  &lt;form&gt;
  
  &lt;div class=thelist&gt;
  
  &lt;ul&gt;
  
  &lt;l&gt;  
  &lt;br&gt;
    &lt;div class=&quot;fj43&quot;&gt;
      &lt;button class=&quot;fjCopyTxtButton&quot; onclick=&quot;copyURL()&quot;&gt;
      CopyQQ
      &lt;/button&gt;
      https://www.TestURL.com/pt/595564
    &lt;/div&gt;
  &lt;br&gt;
  &lt;/l&gt;
  
  &lt;l&gt;
  &lt;br&gt;
    &lt;div class=&quot;fj43&quot;&gt;
      &lt;button class=&quot;fjCopyTxtButton&quot; onclick=&quot;copyURL()&quot;&gt;
      CopyQQ
      &lt;/button&gt;
      https://www.TestURL.com/pt/222222
    &lt;/div&gt;
  &lt;br&gt;
  &lt;/l&gt;
  
  &lt;l&gt;
  &lt;br&gt;
    &lt;div class=&quot;fj43&quot;&gt;
      &lt;button class=&quot;fjCopyTxtButton&quot; onclick=&quot;copyURL()&quot;&gt;
      CopyQQ
      &lt;/button&gt;
      https://www.TestURL.com/pt/333333
    &lt;/div&gt;
  &lt;br&gt;
  &lt;/l&gt;
  
  &lt;/ul&gt;
  
  &lt;/div&gt;
  
  &lt;/form&gt;
  
    &lt;script type=&quot;text/javascript&quot;&gt;
      function copyURL(e) {
        event.preventDefault();
        var aa = event.target.innerText
        console.log(aa)
      }
    &lt;/script&gt;
  
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>