Home  >  Article  >  Backend Development  >  Collection of practical codes for special effects applications in PHP programs_PHP Tutorial

Collection of practical codes for special effects applications in PHP programs_PHP Tutorial

WBOY
WBOYOriginal
2016-07-20 11:05:38788browse

Blocking categories are prohibited

1. Right-clicking is prohibited



2. Selecting is prohibited

< ;body onselectstart="return false">

3. Pasting is prohibited



4. Direct access is prohibited [required Only within the frame]

<script><br>if (top == self)top.location.href = "page.htm";<br></script>

5. Disable frame references

<script><br>if (top != self)top.location.href = "page.htm";<br></script>

 6. Disable function keys Shift, Alt, Ctrl

<script>function key(){<br>if(event.shiftKey) alert("Shift is not allowed!");} document. onkeydown=key; </script>

Data acquisition class

1. Get resolution

<script>document.write("width is" screen.Width "Gaowei" screen.Height)</script>

 2. Get the address bar

<script>document.write(self.location)</script>

 3. Obtain the parameters after the address bar

<SCRIPT>var add = top.location;<br>add = add.toString();<br>document.write (add.substring(add .indexOf("?") 1,add.length));<br></SCRIPT>


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/445100.htmlTechArticleProhibit shielding categories 1. Prohibit right-clicking on body oncontextmenu=return(false) 2. Prohibit selection of body onselectstart=return false 3 .Prohibit pasting body onpaste=return false 4. Prohibit direct access [required box...
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