js copy

    // 复制链接
    $(function(){
        $(".copyBtn").click(function(){
            var url = copyURL();
            if (url == 0) {
                return;
            }
            var aux = document.createElement("input"); 
            aux.setAttribute("value", url); 
            document.body.appendChild(aux); 
            aux.select();
            document.execCommand("copy"); 
            document.body.removeChild(aux);
            jSuccess("message.copy.succ"); // 复制成功
        });
    });

 

posted on 2018-09-29 14:34  钉子His  阅读(123)  评论(0编辑  收藏  举报

导航