您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 招聘面试 > WEB_JavaScript 总结笔记
JavaScriptJavaScriptHTMLNetscapeSunJavaJavaJavaJavaScriptJavaScriptJavaScriptJavaScript3JavaScript3ECMAScriptDOMBOMJavaScriptJavaScriptJavaScriptJavaScriptJavaScriptJavaScript.js1.1.HTMLHTMLJavaScriptJavaScriptJavaScriptJavaScriptWebHTMLHTML2.2.jsJavaScriptHTMLJavaScript1.jsjs3.3.HTMLhrefhttpmailtoJavaScript-JavaScriptJavaScriptHTMLHTMLHTMLJavaScriptJavaScript(;){}JavaScript“//”“/*…*/”JavaScriptJavaScriptJavaScript1.CC++JavaJavaScript2.InfinityNANInfinityNANnotanumber”undefined3.JavaScriptJavaScript4.BooleantrueorfalseJavaScriptundefined1.undefinedundefindedmmundefinedundefined2.nullnullnullundefinedundefinednullJavaScriptJavaScriptJavaScript1.undefined:falsenull:false0NaN,falsetrue0falsetrue.true2.undefined:NaNnull:0true,1,false0:NaNNaN3.undefined:Undefinednull:NaNtruetrue”StringtoLowerCase()JavaScriptJavaScriptvarJavaScriptJavaScriptJavaScriptJavaCJavaScriptJavaScriptJavaCHTMLJavaScriptJavaScriptvar”varundefinedvarJavaScriptvararr=newArray(3);arr.lengthJavascript3newArray();newArray(len);newArray([item0,[item1,[…]]]);JavaScriptmyarray=newArray(num)myarray=newArray(value1,value2…)numJavaScriptJavaScriptJavaScriptJavaScript+-*/%--=”trutfalse==!======!====”==”“!=”==”!==”===”===”&&&&!&^()^()(++)(--):?:if…else”,,voidvoidtypeoftypeoftypeofnumberstringbooleanobjectfunctionundefinedJavaScript+substring(index1,index2)JavaScriptifif(){}elseif(1){}else…}switchswitch(i)casei1:…casei2:…default:…whilewhile(){…}JavaScriptfor(vari=0;i20;i++)do{…}while();continuebreakJavaScriptfunctionreturnfunctionfunction([]){…}preloadTreeImages(1.gif,2.gif,3.gif);functionpreloadTreeImages(){for(vari=0;iarguments.length;i++){varimg=document.createElement(img);img.src=arguments[i];div1.appendChild(img);}}JavaScriptHTML1WebonclickonclickondblclickondblclickonmousedownonmousedownonmouseuponmouseuponmouseoutonmouseoutonmouseoveronmouseoveronmousemoveveonmousemoveeventclientXclientYtypeshiftKeytrueShift;falsectrlKeytrueCtrl;falsealtKeytrueAlt;falseonclickonmousedownonmouseuponmousedownonmouseuponclickondblclickonmousedownonmouseuponclickondblclickonmouseoutonmousemoveonmouseover2onkeydownwnOperaonkeydownonkeypressShiftonkeypressAltonkeyuponkeyupkeyCodeonkeypressUnicode;onkeydown/onkeyupcharCodeUnicodeshiftKeytrueShift;falsectrlKeytrueCtrl;falsealtKeytrueAlt;falseonkeydownonkeypressonkeyupshiftonkeydownonkeyuponkeydownonkeypress;onkeydown3HTMLonbluronbluronfocusTabonfocusonloadwindow;onload;;object/onunloadwindow;onunload;;object/onchangeonchange;onselectonselectonerrorJavaScriptwindow;onerror;object/;onsubmitonsubmitJavaScriptStringDateMathDOMparseInt()parseFloatStringStringStringcharAt(idx)indexOf(Chr)-1lastIndexOf(chr)-1substring(m,n)mnntoLowerCase()toUpperCase()lengthbig()link()bold()big()bold()link()ThisisastringobjecttoLowCase()toUpperCase()indexOf(char,fromIndex)substring(start,end)substringindexOfsubstring(start,end)indexOf[charactor,fromIndex]=JavaScript/”varreg1=/abc/i;varreg2=/a{1,2}b/g;varreg3=/^[\u0391-\Uffe5]+$/ig;2g”3igmi:ignorecase”,gglobalsearch”,lastIndexmmultilinesearch”RegExpRegExpRegExpRegExp(“pattern”,[“flags”newRegExp(“pattern”,[“flags”]);/pattern/[flags];“pattern”:“flags”3i/g/mRegExp”/”RegExp”reg1=/\w+/;reg2=newRegExp(“\\w+”);reg1reg2/”RegExp”\\”\”varre=newRegExp(“\\d{5}”);varre=/\d{5}/;RegExpRegExpindexinputlastMatchlastPatternleftContextrightContext$1-$9globalignoreCasemultilinelastIndexsource()xxa1b01c001yya2b02c002zz/a(\d)b(\d{2})c(\d{3})/gi01.htmlRegExpexec()pattern.exec(str)null1Global”execmatch“exec”lastIndex”lastIndex0test()true/falsepattern.test(str);exec06.htmllastIndexg(global)trueexectestexectestlastIndexvarstr=“acbc”;varreg=/c/gireg.test(str);//test//:2c2document.write(“reg.lastIndex”+reg.lastIndex);reg.test(str);//:4c4document.write(“reg.lastIndex”+reg.lastIndex);exectestlastIndex0varstr=“acbc”;varreg=/e/gireg.test(str);//test//:0document.write(“reg.lastIndex”+reg.lastIndex);lastIndex0exectestlastIndexgglobaltruevarreg=/c/glastIndex0varreg=/a/gi;reg.lastIndex=0;Stringmatchmatch(rgExp)RegExpexec02.htmlsearchsearch(rgExp)03.htmlreplacereplace(rgExp,replaceText)04.html05.htmlsplitsplit([separator[,limit]]){n}“n”no{2}Bobofoodofoooodo{n,}no{2,}Bobofooooodo{n,m}nmo{1,3}foodo*0zo*zzoo*{0,}+1zo+zozoozo01zo?zzozoozozoozoomzo?rromroomzoomzo*rrmromroom?*+?{n}{n,}{n,m}foooodfo+?fofo+foooo|chapter|section1chaptersection1chapter1section107.html(pattern)pattern”match”$1….$9”\(”\)”(”123\numnum99995\d{5}5(\d)\1{4}\11{4}\14508.html(?:pattern)varstr=“#123456789”;varreg=/#(?:\d+)/;alert(str.replace(reg,”abcdRegExp$1”);abcdRegExp$1RegExp.$X$1\f\n\r\t\v\uXXXXUnicode[…][xyz][^…][^xyz][a-z][^a-z]-\[a\-z]-[-a-z][a-z-]\d[0-9]\D[^0-9]\s[\f\n\r\t\v]\S\w[a-zA-Z0-9_]\W.\n”(.)\1\n\n[\s\S][\d\D][\w\W].”\.”^m”^”\n”\r”^ookohelloohelloo$m”“^”\n”\r”o$helloookooko10.html\ber\bneverokerverber\Ber\Bverberneveroker\$()*+.[]?\/^{}IP1JavaScript2Firstsecond\nThirdfourch\nFifthsixthFirstThirdFifthE-mail1aaa@aa.cnAa_a-a@aa.com_a+a@aa.com1111@qq.com.comAaa_@dc.comaa.aa@qq.com2EmailYYYY-MM-DDYYYY/MM/DDHH:mm:ssYYYY-MM-DDHH:mm:ssWebLogic192.
本文标题:WEB_JavaScript 总结笔记
链接地址:https://www.777doc.com/doc-6238590 .html