Javascript technical skills Encyclopaedia (1)

Related Tags:

  / / All sizes s = "\ r \ n website that regional Width:" document.body.clientWidth; 
  S = "\ r \ n website that regional high:" document.body.clientHeight; 
  S = "\ r \ n website that regional high:" document.body.offsetWeight "(including sideline wide)"; 
  S = "\ r \ n website that regional high:" document.body.offsetHeight "(including sideline wide)"; 
  S = "\ r \ n Text page transcript Width:" document.body.scrollWidth; 
  S = "\ r \ n Text by high website:" document.body.scrollHeight; 
  S = "\ r \ n web page to the high volumes:" document.body.scrollTop; 
  S = "\ r \ n website scrolled to the left:" document.body.scrollLeft; 
  S = "\ r \ n part of the body's website:" window.screenTop; 
  S = "\ r \ n page text of the Left:" window.screenLeft; 
  S = "\ r \ n high screen resolution:" window.screen.height; 
  S = "\ r \ n the wide screen resolution:" window.screen.width; 
  S = "\ r \ n screen work area can be high:" window.screen.availHeight; 
  S = "\ r \ n Width of the screen available work area:" window.screen.availWidth; 

      / / Digital filtering <input type=text onkeypress="return event.keyCode> = 48 & & event.keyCode <= 57 | | (this.value.indexOf ('.')< 0? Event.keyCode == 46: false) " onpaste = "return! clipboardData.getData ( 'text'). match (/ \ D /)" ondragenter = "return false"> 

      / / Special purpose <input type=button value= Daorushoucangga onclick="window.external.ImportExportFavorites(true,'http://localhost');"> 
      <input Type=button value= Daochushoucangga onclick="window.external.ImportExportFavorites(false,'http://localhost');"> 
      <input Type=button value= Zhenglishoucangga onclick="window.external.ShowBrowserUI('OrganizeFavorites', null)"> 
      <input Type=button value= Yuyanshezhi onclick="window.external.ShowBrowserUI('LanguageDialog', null)"> 
      <input Type=button value= Jiarushoucangga onclick="window.external.AddFavorite('http://www.google.com/','google')"> 
      <input Type=button value= Jiarudaobindao onclick="window.external.addChannel('http://www.google.com/')"> 
      <input Type=button value= Jiarudaobindao onclick="window.external.showBrowserUI('PrivacySettings',null)"> 

      / / Cache <META HTTP-EQUIV="pragma" CONTENT="no-cache"> 
      <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate"> 
      <META HTTP-EQUIV="expires" CONTENT="0"> 


      / / Is a match 

      Chinese characters are matching regular expression: [\ u4e00-\ u9fa5] 
      Matching double-byte characters (including Chinese characters,): [^ \ x00-\ xff] 
      Matching empty row of the regular expression: \ n [\ s |] * \ r 
      html match marked the regular expression :/<(.*)>.*< \ / \ 1 >|<(.*) \ /> / 
      Matching the space is both the expression: (^ \ s *) | (\ s * $) (as vbscript as the trim function) 
      Email addresses match a regular expression: \ w ([-.] \ W) * @ \ w ([-.] \ w) * \. \ W ([-.] \ w) * 
      Matching at the Regular Expression URL: http:// ([\ w-] \.) [\ W-] (/ [\ w-./?%&=]*)? 
      Following are examples: 
      Use a regular expression in the form of restricted page text input box: 
      As a regular expression, only restricted the importation of Chinese: onkeyup = "value = value.replace (/ [^ \ u4E00-\ u9FA5] / g ,'')" onbeforepaste =" clipboardData.setData ( 'text', clipboardData.getData ( 'text'). replace (/ [^ \ u4E00-\ u9FA5] / g ,''))" 
      1. Using the regular expression can only import restrictions on the whole angle characters: onkeyup = "value = value.replace (/ [^ \ uFF00-\ uFFFF] / g ,'')" onbeforepaste =" clipboardData.setData ( 'text', clipboardData.getData ( 'text'). replace (/ [^ \ uFF00-\ uFFFF] / g ,''))" 
      2. Restricted by the regular expression can only import figures: onkeyup = "value = value.replace (/ [^ \ d] / g,'')," onbeforepaste = "clipboardData.setData ( 'text', clipboardData.getData ( 'text'). replace (/ [^ \ d] / g ,''))" 
      3. Restricted by the regular expression can only input numbers and English: onkeyup = "value = value.replace (/ [\ W] / g,'')," onbeforepaste = "clipboardData.setData ( 'text', clipboardData.getData ( 'text'). replace (/ [^ \ d] / g ,''))" 

      / / Eliminate image toolbar <IMG SRC="mypicture.jpg" HEIGHT="100px" WIDTH="100px" GALLERYIMG="false"> 
      Or 
      <head> 
      <meta Http-equiv="imagetoolbar" content="no"> 
      </ Head> 

      / / Silent Close 

      Function Close () 
      ( 
      Var ua = navigator.userAgent 
      Var ie = navigator.appName == "Microsoft Internet Explorer"? True: false 
      If (ie) 
      ( 
      Var IEversion = parseFloat (ua.substring (ua.indexOf ( "MSIE"), 5 ua.indexOf (";", ua.indexOf ( "MSIE ")))) 
      If (IEversion <5.5) 
      ( 
      Var str = '<object id=noTipClose classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11">' 
      Str = '<param name="Command" value="Close"> </ object>'; 
      Document.body.insertAdjacentHTML ( "beforeEnd" str); 
      Document.all.noTipClose.Click (); 
      ) 
      Else 
      ( 
      Window.opener = null; 
      Window.close (); 
      ) 
      ) 
      Else 
      ( 
      Window.close () 
      ) 
      ) 

      / / Obtain the absolute Position control (1) 

      <script Language="javascript"> 
      Function getoffset (e) 
      ( 
      Var t = e.offsetTop; 
      Var l = e.offsetLeft; 
      While (e = e.offsetParent) 
      ( 
      T = e.offsetTop; 
      L = e.offsetLeft; 
      ) 
      Var rec = new Array (1); 
      Rec [0] = t; 
      Rec [1] = l; 
      Return rec 
      ) 
      </ Script> 

      / / Get the absolute position control (2) 

      ORect = obj.getBoundingClientRect (); 
      ORect.left 
      ORect. 

      / / Minimize, maximize, and close <object id=min classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11"> 
      <param Name="Command" value="Minimize"> </ object> 
      <object Id=max classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11"> 
      <param Name="Command" value="Maximize"> </ object> 
      <OBJECT Id=close classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"> 
      <PARAM NAME="Command" value="Close"> </ OBJECT> 
      <input Type=button value= Cuoxiaohua onclick=min.Click()> 
      <input Type=button value= maximize onclick=max.Click()> 
      <input Type=button value= closed onclick=close.Click()> 

      / / Cursor stops in the final text 

      <script Language="javascript"> 
      Function cc () 
      ( 
      Var e = event.srcElement; 
      Var r = e.createTextRange (); 
      R.moveStart ( 'character', e.value.length); 
      R.collapse (true); 
      R.select (); 
      ) 
      </ Script> 
      <input Type=text name=text1 value="123" onfocus="cc()"> 

      / / Pages to enter and exit the effects 

      Enter the pages <meta http-equiv = "Page-Enter" content = "revealTrans (duration = x, y = transition)"> 
      Launch page <meta http-equiv = "Page-Exit" content = "revealTrans (duration = x, y = transition)"> 
      This is the page is loading and transfer some of the special effects.    Duration of the effects that the duration, in seconds flat.    Which transition that the use of special effects, value for 1-23: 
      0 rectangular narrow rectangular expand a narrow two round 3 round 4 under to expand on the set 5 to 6 refresh under left-to-right refresh 7 refresh 8 right-to-left horizontal blinds vertical blinds 9 dislocation 10 horizontal blinds dislocation 11 vertical blinds 12:00 about the proliferation of 13 to 14 among the middle set to refresh about 15 upper and lower middle to upper and lower 16 to 17 lower right to upper left middle right upper 18 to 19 left to the right lower left to upper right 20 left 21 bands 22 Vertical Bar 

    Related articles:

    Web Design Thoughts (5) _ determine the overall web site design and creative style
      Site creative style and the overall design is the hope that the head of their master, is also the most difficult to learn.    Difficult it will be difficult in the absence of a fixed program can refer to and imitation.    Give you a theme, no two are exactly the same as it...
    How to use HTML pages in the meta element?
      1: If you say that your site so a page:    <META NAME="robots" CONTENT="index,follow">    You use Nutch crawling and analysis, how to get this meta numerical and address?    2: You can expand from a RobotsParserFilter HtmlParseFilter...
    MD5 encryption achieve javascript
      <script>    / * MD5 Message-Digest Algorithm - JavaScript    MODIFICATION HISTORY:    1.0 16-Feb-2001 - Phil Fresle (<A href="mailto:sales@frez.co.uk"> sales@frez.co.uk </ A ") - Initial Version (VB / ASP code)    1.0 2...
    HTML thorough analysis (15) palette Principle
      ■ palette Principle    HTML that can be divided into two colors:    To name commonly used definition of the colour of ways, such as RED.    By RGB values, such as red # FF0000 said.    Included in the naming of little color is not very convenient, ...
    CSS Senior Guide @ Rules
      At (@) Rules of the CSS rules compressed into a capsule, and the application to the designated certain things in the.    Oh.    Introduction    Import rules will be incorporated into the import at another style sheet.    For example, if you need to se...