HTML Editor
<!DOCTYPE html> <html lang="en-US"> <body> <p>Select this paragraph and click on the button to check query command "copy".</p> <button onclick="myFunction()">Click Me</button> <script> function myFunction(){ var flg = document.queryCommandEnabled("copy"); if(flg) alert("You can copy the selected text in the paragraph"); else alert("query command is disabled"); } </script> </body> </html>
OUTPUT
×

Save as Private