Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

vue js copy text to clipboard

  methods: {
    copyURL() {
      var Url = this.$refs.mylink;
      Url.innerHTML = window.location.href;
      console.log(Url.innerHTML)
      Url.select();
      document.execCommand("copy");
    }
  }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #vue #js #copy #text #clipboard
ADD COMMENT
Topic
Name
5+5 =