Skip to content

Instantly share code, notes, and snippets.



Created Jun 30, 2020
What would you like to do?
function click_copyList(){
var copyText = document.getElementById("fileNameTable").innerText; // gets text from table
document.getElementById("holdText").innerText = copyText;//send table text to input field
document.getElementById("holdText").select();//select or highlight the input field text
document.execCommand("copy");//copy selected text
alert("copied the text!");
} //end copyList
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment