Effect:

Paste the photo:

 

Source:

<div class="box_m form_conter">
    <span class="box_p lader">Social Credit Code:</span>
    <input type="text" value="form_tone" id="form_tone">
    <span class="box_p bader" @click="copyCode">copy</span>
</div>
Copy the code
new Vue({
    el: '#Online'.data: {},created() {
        var _this = this;
    },
    methods: {
        copyCode() {
            var copycode = document.getElementById("form_tone");
            copycode.select(); // Select the object
            document.execCommand("Copy"); // Execute the browser copy command
            alert("Has been copied, can stick.")}}})Copy the code