编辑下面的代码:【加编码】
<html> <body> <p>该实例演示了如何向 input 元素添加 "oncopy" 事件。</p> <input type="text" oncopy="myFunction()" value="尝试拷贝文本"> <script> function myFunction() { alert("你拷贝了文本!"); } </script> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂