如何通过使用javascript禁用网站中的鼠标右键单击属性 [英] How to disable mouse rightclick properties in website by using javascript

查看:53
本文介绍了如何通过使用javascript禁用网站中的鼠标右键单击属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我不知道如何在网页中禁用鼠标右键选项,请给我一些使用javascript代码执行的步骤.

谢谢.

Hi,

I have no idea on how to disable mouse right click options in webpage please give me steps to do by using javascript code.

thanking you.

推荐答案

在此处获取良好的代码:
http://rainbow.arch.scriptmania.com/scripts/no_right_click.html [ ^ ]
另一个有用的链接:
http://www.dynamicdrive.com/dynamicindex9/noright.htm [ http://javascriptsource.com/page-details/no-right-click.html [ ^ ]
Get a good code here:
http://rainbow.arch.scriptmania.com/scripts/no_right_click.html[^]
Another useful links:
http://www.dynamicdrive.com/dynamicindex9/noright.htm[^]
http://javascriptsource.com/page-details/no-right-click.html[^]


试试这个
http://btewary.blogspot.in/2010/07/how-to-disable-copy-paste-and-cut-on.html [
Try this
http://btewary.blogspot.in/2010/07/how-to-disable-copy-paste-and-cut-on.html[^]


您可以在下面使用此代码

You could use this code below

<body  öncontextmenu="return false;"></body>



大多数现代浏览器都支持oncontextmenu事件期间,此代码将返回false.



This code will return false during the oncontextmenu event, supported by most of the modern browsers.


这篇关于如何通过使用javascript禁用网站中的鼠标右键单击属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆