JS禁止网页右键

禁止网页右键JS代码:

<html>
    <body oncontextmenu="return false" onselectstart="return false" ondragstart="return false" onbeforecopy="return false" oncopy=document.selection.empty() onselect=document.selection.empty()>
<script type="text/javascript">
    try {
        $(document).bind("contextmenu", function () { return false; });
        $(document).bind("selectstart", function () { return false; });
        $(document).keydown(function () { return key(arguments[0]) });
    } catch (e) { }
</script>
</body>
</html>

标签: JavaScript

评论已关闭