Some of the technical JS code

Source: Internet
Author: User
Tags net return window
Summarize some of the technical JS code, I hope to help you.
    • Maximize page Implementation

Self.moveto (0,0);
Self.resizeto (Screen.availwidth,screen.availheight);
Self.focus ();

    • Default img Picture

If no mengzhaobin.jpg is displayed error.jpg

    • Mask right mouse button

oncontextmenu= "Window.event.returnvalue=false"

    • Deselect to prevent replication
--><body onselectstart= "return false" >
    • No pasting.

Onpaste= "return False"

    • Prevent replication

Oncopy= ' return false; ' oncut= ' return false;

    • There are icons in front of the address bar and favorites
--><link rel= "Shortcut Icon" href= "Favicon.ico" > <link rel= "Bookmark" href= "Favicon.ico" >
    • Close IME

<input style= "ime-mode:-disabled" >

    • To prevent a person from being frame

if (top.location!= self.location) top.location=self.location;

    • Web pages cannot be saved as

<noscript><iframe src= "*.html" ><iframe><noscript>

    • View Page Source code
--><input Type=button value= "View Web page source code" onclick= "window.location = ' view-source: ' + http://laohekou.net/'";>
    • Pop-up dialog box and jump

<a href= ' javascript:if (Confirm ("Delete?") location= "Http://laohekou.net" ' > Delete a>

    • Pop-up window on top
--><body onblur= "This.focus ();" >
    • Previous page Source

Document.referrer

    • No cache

<meta http-equiv= "Pragma" content= "No-cache" >
<meta http-equiv= "Cache-control" content= "No-cache, must-revalidate" >
<meta http-equiv= "Expires" content= "Wed Feb, 1997 08:21:57 GMT" >
or <meta http-equiv= "expires" content= "0" >

    • Do not scroll bar

No vertical bar <body style= ' Overflow:-scroll;overflow-y:hidden ' > body>
No bars: <body style= ' Overflow:-scroll;overflow-x:hidden ' > body>
Two: <body scroll= "No" >body>



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.