我把这个网页的代码由贴出来:

 

<html>

<head>
<title> fdsafdsafsda</title>
<script language="javascript">
<!--
function MM()
{
  
if(event.srcElement.id=='an'//判断右击事件发生在哪个对像上面
{
  alert(
"对不起,本图片不能复制,版权所有!")
 document.oncontextmenu
=new Function("event.returnValue=false;");   //禁用右键功能
}
else
{
  document.oncontextmenu
=new Function("event.returnValue=true;");  //启用右键功能

}

-->
</script>
</head>



<body oncontextmenu="MM()">
  
<p><center><img id="an" src="Wallpaper/2_12011134O.jpg"/ width="250px" height="160px"></center> </p>  
</body>

</html>

相关文章:

  • 2022-02-03
  • 2022-01-06
  • 2022-12-23
  • 2022-12-23
  • 2021-11-30
  • 2022-12-23
  • 2021-06-28
  • 2021-08-30
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案