function copy_url(){ var txt=document.title; txt+="\r\n"; txt+=this.location.href; if (!navigator.clipboard) { var ele = document.createElement("input"); ele.value = txt; document.body.appendChild(ele); ele.select(); document.execCommand("copy"); document.body.removeChild(ele); if (document.execCommand("copy")) { showMessage("链接复制成功",1); } else { showMessage("当前浏览器不支持一键复制",0); } } else { navigator.clipboard.writeText(txt).then(function () { showMessage("链接复制成功",1); }).catch(function () { showMessage("当前浏览器不支持一键复制",0); }) } } function showMessage(message, type) { let messageJQ= $("