title: trigger javascript from onclick in Dash
body: <p>I have a Python Dash app running, with a couple of callbacks and a nice looking graph. What I need next, is to have a button for copying some results to the cliboard in excel format (pretty specific, yup). I guess I need to implement a javascript function triggered by a <strong>button onclick</strong>, but I have no idea how to get the Python app to call the javascript. Can somebody help me out with this one? :)</p>
  
  <p>something like this:</p>
  
  <pre><code>function copy_to_cliboard() {
    var copyText = document.getElementById("text_input");
  
    copyText.select();
    copyText.setSelectionRange(0, 99999);
  
    document.execCommand("copy");
  
    alert("Copied the text: " + copyText.value);
  }
  </code></pre>
  
  <p>thanks a lot!</p>