Hello Guys I want to copy input value yeah on button click But nothing work. Please Help!!
<script>
  function copyToClipboard(element) {
    var $temp = $("<input>");
    $("body").append($temp);
    $temp.val($(element).text()).select();
    document.execCommand("copy");
    $temp.remove();
  }
</script>   
<input type="text" class="form-control" name="myvalue"  id="myvalue" value="YEAH" readonly  />
<button class="btn btn-primary btn-block" onclick="copyToClipboard('#myvalue')">Copy myvalue</button>
 
     
    