15.13 禁止图像的复制.htm

来自「这是一些常用的JavaScript的特效的源码和教程」· HTM 代码 · 共 31 行

HTM
31
字号
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>标题页</title>
    <script language="javascript">
    function noCopy(control)
    {
	alert("版权所有,禁止复制!");
	return false;
    }
    function check() 
    {
	if(document.images)  //遍历页面中的图像
	    for(i=0;i<document.images.length;i++)
		document.images[i].onmousedown = noCopy;
    }
    </script>
    
</head>
<body onload="check()">
<img src='' width=70 height=50 border=1 alt='我的图片'>
<div> 
<table width="300" height="50" border="0" cellspacing="2" cellpadding="0" bgcolor="#FFb609">
  <tr> 
    <td bgcolor="#ccffff">禁止复制网页中所有图片...</td>
  </tr>
</table>
</div>
    
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?