Some technical practical JS code summary _javascript Skill

Source: Internet
Author: User
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://jb51.net/'";>
Pop-up dialog box and jump
<a href= ' javascript:if (Confirm ("Delete?") location= "Http://jb51.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.