代码编辑器:
x
1
<p>尝试拷贝以下图片</p>
2
<img src="/static/i/img3.jpg" oncopy="myFunction()" width="100" height="132">
3
<p><strong>注意:</strong> 该范例如果在 Chrome, Firefox 和 Opera 浏览器中可能无法工作</p>
4
<script>
5
function myFunction() {
6
alert("你已拷贝了图片!");
7
}
8
</script>
9