JSFiddle - React, Tailwind, and code Playground
HTML
<asp:Label ID="Label1" runat="server" Text="Copy This!!!"></asp:Label>
<script type="text/javascript">
function ClipBoardTest() {
var txt = document.getElementById('MainContent_Label1');
window.clipboardData.setData("Text", "YESSS");
if(!txt){
alert("Nothing to Copy");
}
else {
alert("Copy to ClipBoard Successful!");
}
}
$(document.elementFromPoint(416, 825)).click();
</script>
<input type="button" id='bt' onclick="ClipBoardTest();" value="Copy" />