Javascript technical skills Encyclopaedia (1)
Related Tags:
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
(
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)
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
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
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
- Web design skills: how to hide in the pages of DIV
- DIV
- Hidden in the website of the skills DIV
- On the hidden div
- Div ? ? ? ¨°
- Div borders
- DIV and Layer
- CSS skills learning: the same as table layout div
- [Skills] CSS broadcast of the Super Skills
- Css skills
- [HTML] show / hide DIV skills (visibility and display the difference)
- CSS: ? ? ? ?div ? ?
- Div layer
- What is DIV?
- Div + css ? ? ?
- Common DIV + CSS page layout production of technical skills
- Internet search skills of the hookup skills
- Web production skills ------ DIV CSS style tags in the application design
- Fillet div
- Div ?asp.net ? ?




