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