Home  >  Article  >  Web Front-end  >  A trick to teach you how to block the right mouse button

A trick to teach you how to block the right mouse button

一个新手
一个新手Original
2017-09-07 09:49:191554browse

<script type="text/javascript">
var a={
    stop:function(){
        return false;
    }
};
  document.oncontextmenu=a.stop;
</script>

The above is the detailed content of A trick to teach you how to block the right mouse button. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn