编辑下面的代码:【加编码】
<html> <body> <p oncopy="myFunction()">尝试拷贝文本</p> <script> function myFunction() { alert("你拷贝了文本!"); } </script> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂