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