编辑下面的代码:【加编码】
<html> <body> <p>尝试拷贝以下图片</p> <img src="/demo/w3javascript.gif" oncopy="myFunction()" width="100" height="132"> <p><strong>注意:</strong> 该实例如果在 Chrome, Firefox 和 Opera 浏览器中可能无法工作。</p> <script> function myFunction() { alert("你已拷贝了图片!"); } </script> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂