Practical Code Collection for special effect applications in PHP programs _ PHP Tutorial

Source: Internet
Author: User
Practical Code Collection for special effect applications in PHP programs. Disable blocking class 1. disable right-click bodyoncontextmenureturn (false) 2. disable bodyonselectstartreturnfalse3. disable bodyonpastereturnfalse4. disable direct access. [do not disable blocking class.

1. right-click disabled



2. do not select



3. disable pasting.


 
4. prohibit direct access [only within the framework]

Script
If (top = self) top. location. href = "page.htm ";
Script

5. disable frame reference

Script
If (top! = Self) top. location. href = "page.htm ";
Script

6. disable function keys Shift, Alt, Ctrl

Script function key (){
If (event. shiftKey) alert ("Shift does not agree to use! ");} Document. onkeydown = key; script

Data acquisition

1. get resolution

Script document. write ("Width is" screen. Width "and Height is" screen. Height ") script

2. get the address bar

Script document. write (self. location) script

3. get the parameters in the address bar

SCRIPT var add = top. location;
Add = add. toString ();
Document. write (add. substring (add. indexOf ("? ") 1, add. length ));
SCRIPT


Lifecycle 1. disable right-click body oncontextmenu = return (false) 2. do not select body onselectstart = return false 3. disable body onpaste = return false 4. prohibit direct access [required box...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.