From 8abe7b3b6d2f456d487320ea35f3b22da3f46180 Mon Sep 17 00:00:00 2001 From: Fan Shen <1370275510@qq.com> Date: Tue, 9 Jul 2019 14:37:26 +0800 Subject: [PATCH] add: prompts after copy finished --- index.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/index.html b/index.html index 5016baa..c12f6f6 100644 --- a/index.html +++ b/index.html @@ -61,6 +61,14 @@ } else { document.getElementById("code").value = sk_pwd; } + var successText = document.getElementById("btn_copy"); + clipboard.on("success", function() { + successText.innerHTML = "复制好了"; + console.log("success") + }); + clipboard.on("error", function() { + console.log("failed") + }); } }