From daf603af2f80b4d584374221fcac4ccb93022b81 Mon Sep 17 00:00:00 2001 From: App004 Date: Fri, 25 Oct 2024 11:00:59 +0700 Subject: [PATCH] Update index.js --- index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/index.js b/index.js index 0eb6aa4..19b1404 100644 --- a/index.js +++ b/index.js @@ -1,3 +1,10 @@ function open-1(){ window.open("./menu") } +function copy() { + var copyText = document.getElementById("myInput"); + copyText.select(); + copyText.setSelectionRange(0, 99999) + document.execCommand("copy"); + alert("Copied the text: " + copyText.value); +} \ No newline at end of file