The common JavaScript rollup in B/S mode project

Source: Internet
Author: User

  This article is a b/s model of the commonly used JavaScript in the summary of the introduction, the need for friends can come to the reference, hope to help everyone else

Screen Cheat page's right key <body oncontextmenu= "return false" > or <body style= "Overflow-y:hidden" >   Add background music to the Web page ie:< Bgsound src= "*.mid" loop=infinite> ns:<embed src= "*.mid" Autostart=true hidden=true *.mid Your background music midi format files   automatically open and close Windows   <script language= "& #106avascript" >  function Winopen1 () { Open Window name =open ("NB", "homepage", "Toolbar=no,location=no, Directories=no,status=no,menubar=no,scrollbars=no, Resizable=no, copyhistory=no,width=160,height=200,left=200,top=100 "; ) </script>   <a href  onmouseover= "winopen1 (); return true;" onmouseout= "open Window name. Close ();" > <p> Here is the connection </a></p>   Let the browser fail to save the page so that the user cannot save the web face <noscript><iframe src= "*.html" > </iframe></NOSCRIPT>    Page Auto close <html> <head> <object id=closes type= "Application  /x-oleobject "classid=" Clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11 "> <param name=" Command "value=" Close "> </object> </head> <body onload= "Window.settimeout (' closes.  Click () ', 10000 ' > This window will automatically close after 10 seconds without prompting. </body> </html>   More tips:   1. oncontextmenu= "Window.event.return Value=false" will completely screen the right mouse button   <table border Oncontextmenu=return (false) > <td>no</table> can be used for table    2. <body onselectstart= "return false" > deselect, Prevent replication     3. Onpaste= "return false" is not allowed to be pasted     4. Oncopy= ' return false; ' oncut= ' return false; ' Prevent replication     5. <link rel= "shortcut icon" href= "Favicon.ico" > IE Address bar before replacing its own icon     6. <link rel= "Bookmark" href= "Favicon.ico" > can display your icon     7 in your Favorites folder. <input style= "ime-mode:disabled" > Close IME     8. Will always be with frame   <script language= "javascript" ><!--  if (window = top) Top.location.href = "frames.htm"; file& #58//frames.htm for frames page  //--></script>    9. Prevent being frame  <script language=javascript><!--  if (top.location!= self.locatION) top.location=self.location; //--></script>    10. <noscript><iframe src=*.html></iframe></noscript> page will not be saved as     11. <input type=button value= View Web page source code   onclick= "window.location = ' view-source: ' + ''" >     14. The cursor is stopped at the end of text box text   <script language= "javascript" >  function cc ()   {  var e = event.srcelement;& nbsp var r =e.createtextrange ();  R.movestart (' character ', e.value.length);  R.collapse (True); () ; }  </script>  <input type=text name=text1 value= "123" onfocus= "CC ()" >    15. To determine the source of the previous page   asp:  request.servervariables ("Http_referer")   javascript:  document.referrer    16. Minimize, maximize, close windows   <object id=hh1 classid= "clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" >  <param name= "Command" value= "Minimize" ></object>  <object id=hh2 classid= "clsid:adb880a6-"D8ff-11cf-9377-00aa003b7a11 ">  <param name=" Command "value=" Maximize "></object>  < OBJECT id=hh3 classid= "clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" >  <param name= "Command" value= "Close" ></OBJECT>  <input Type=button value= minimize onclick=hh1. Click () >  <input Type=button value= maximize ONCLICK=HH2. Click () >  <input Type=button value= closes Onclick=hh3. Click () >  This example applies to ie    18. Web pages will not be cached   HTM pages   <meta http-equiv= "Pragma" content= "No-cache" >  <meta http-equiv= " Cache-control "content=" No-cache, must-revalidate ">  <meta http-equiv=" Expires "content=" Wed, Num FEB 1997 08:21:57 GMT ">  or <meta http-equiv=" expires "content=" 0 ">    19. Check that a string of strings is composed entirely of numbers   <script language= "javascript" ><!--  function checknum (str) {return str.match/d/ ) ==null}  alert (Checknum ("1232142141"))   Alert (Checknum ("123214214A1"))  //--></script>&nbsp   21. How to determine if the character   if (/[^x00-xff]/g.test (s)) alert ("contains Chinese characters");  else alert ("All characters");    22. TextArea number of adaptive lines of text   <textarea Rows=1 name=s1 cols=27 onpropertychange= " This.scrollheight ">  </textarea>    23. Date minus days equals second date   <script language=javascript>  function cc (dd,dadd)   {  var a = new Date (DD) & nbsp A = a.valueof ()   A = a-dadd * * * 1000  a = new Date (a)   alert (a.getfullyear () + "year" + (A.getm Onth () + 1) + "month" + a.getdate () + "Day")  }  cc ("12/23/2002", 2)   </script>    27.ENTER key allows the cursor to move To the next input box   <input onkeydown= "if (event.keycode==13) event.keycode=9" >   
Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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: and provide relevant evidence. A staff member will contact you within 5 working days.