您好,欢迎访问三七文档
当前位置:首页 > IT计算机/网络 > 数据库 > WEB_JavaScript 深度剖析(从入门到精通)
JavaScriptJavaScriptJavaScriptJavaScriptWEBJavaScriptInternet,,,,,.,,,.Internet,Internet.,,Internet.Internet,,,.(),.,HTML.Web.(HyperText)(HyperMedia)(Hyperlink)(web),(Document),Internet.HTML,,,,.,,.CGI(CommonGatewayInterface),,Internet.JavaScript,Internet.,JavaScript,JavaScript.JavaScript,,,,.CGIHTML,Web.JavaScript..,(Object)(EventDriven).HTML,Java(Java)Web,Web..HTML.HTML,JavaHTML,:JavaScript,.,JavaScript,.C,C++,VB,Delphi.,,.HTML,..JavaScript,..,.JavaScript:Java,Java.,.JavaScript,,,,..JavaScript,,Web.,.,(HomePage),(Event).,,.,.JavaScript,,,JavaScript.,.JavaScript.,,WEB,.JavaScript,HTML.JavaScript(:form),,,(server),,(client).JavaScriptJava,!JavaJavaScript,JavaScript.JavaScript,JavaJavaScript.,JavaScriptJavaJavaScriptJava,.JavaSUN,Internet;JavaScriptNetscape,NetscapeNavigator,Web,LiveScript;JavaOak.:Java,,.JavaScript,,.(ObjectBased)(EventDriver)...Java,,,.JavaScript,,..Java,.:Integerx;Stringy;x=1234;x=4321;X=1234,Y=4321.JavaScript,.,,:x=1234;y=4321;x,y.JavaHTML,HTML,.JavaScript,HTML,.HTML.HTML,,JavaScript,Java…….Java,Java,.JavaScript,JavaScript,.,JavaScript1.Java:Windows95/98WindowsNT.NetscapeNavigatorx.0InternetExplorerx.0.HTML(WS,WPS,Notepad,WordPad)HTML.:Windows95/98WindowsNT.:32M.CRT256,640X480.CPU233.().,JavaScript,JavaScript.JavaScriptHTML.test1.html:InternetExplore5.01-1.1-1:test.htmlHTML,HTML;HTML,JavaScript,HTML.JavaScript.JavaScriptalert()JavaScript,OK():JavaScript,;,.,.JavaScript.,JavaScript.JavaScriptJavaScriptC++,C,.C++C,JavaScript.,JavaScriptJavaScriptHTML,HTML.HTML,Internet.JavaScript::JavaScript.Language=JavaScript,JavaScript,JavaScript.JavaScriptWeb:Test2.htmltest2.html,.2.2:Document.write(),;document.close().head..…….JavaScript,,;JavaScript.,JavaScript,,.JavaScript,,.1,JavaScript:(),(''),(TrueFalse).JavaScript,.JavaScript,,.,.2,JavaScript,.,.,12.32,193.98.:5E7,4e5.:TrueFalse.,.C++,C++10,JavaScriptTrueFalse.(')().ThisisabookofJavaScript,3245,ewrt234234.JavaScriptnull,.,Null.C,JavaScript(/)..3,,.,,.JavaScript,:A,,,test1,text2.(-),,(+),(-),(,).B,JavaScript.JavaScript40,JavaScript,.Var,int,double,true.,,.JavaScript,Var:varmytest;mytest..Varmytest=Thisisabookmytest,.JavaScript,,.:x=100y=125xy=Truecost=19.5.x,y,xy,cost.JavaScript,.var.;JavaScript,,..JavaScript.,;,,.,1,,,,,,,,,,,.2,,JavaScript,+,-,*,/;!=,==;!(),|,||;+,+=.JavaScript.:12.50+40,This+that.,,.(1)JavaScript.:+(),-(),*(),/(),%(),|(),&(),(),(),(,).:-(),~(),++(1),--(1).(2),,trueFalse,8:(),(),=(),=(),==(),!=().(3)JavaScript:!(),&=(),&(),|=(),|(),^=(),^(),?:(),||(),==(),|=().:?1:2,1,2.,JavaScript.Test2_1.html1:12:...test3_2.htmfunctionmakeArray(n){this.length=nreturnthis}functionhexfromdec(num){hex=newmakeArray(1);varhexstring=;varshifthex=16;vartemp1=num;for(x=1;x=0;x--){hex[x]=Math.round(temp1/shifthex-.5);hex[x-1]=temp1-hex[x]*shifthex;temp1=hex[x-1];shifthex/=16;}for(x=1;x=0;x--){hexstring+=getletter(hex[x]);}return(hexstring);}functiongetletter(num){if(num10){returnnum;}else{if(num==10){returnA}if(num==11){returnB}if(num==12){returnC}if(num==13){returnD}if(num==14){returnE}if(num==15){returnF}}}functionrainbow(text){varcolor_d1;varallstring=;for(i=0;itext.length;i=i+2){color_d1=255*Math.sin(i/(text.length/3));color_h1=hexfromdec(color_d1);allstring+=FONTCOLOR=+color_h1+ff+color_h1++text.substring(i,i+2)+;}returnallstring;}functionsizefont(text){varcolor_d1;varallstring=;varflag=0;for(i=0,j=0;itext.length;i=i+1){if(flag==0){j++;if(j=7){flag=1;}}if(flag==1){j=j-1;if(j=0){flag=0;}}allstring+=+text.substring(i,i+1)+;}returnallstring;}document.write()document.write()document.write(sizefont(WEB))document.write()document.write(:+navigator.appName+);document.write(:+navigator.appVersion+);document.write(:+navigator.appCodeName+);document.write(:+navigator.userAgent);2.2JavaScript.,,JavaScript.JavaScriptJavaScriptJavaScript(Object-Based),(object-oriented).,,,.,.JavaScript,.,JavaScript,Web.,1,JavaScript(properties)(methods).,,;,.2,,:JavaScript;;.,,,.JavaScript.,.3,JavaScript,,JavaScript,JavaScript.1),For……in:For(in):.;..::FunctionshowData(object)for(varX=0;X30;X++)document.write(object[i]);,,,,.For……in,,:FunctionshowData(object)for(varpropinobject)document.write(object[prop]);,,For,.2),with:,,.withobject{……}with,object.3),histhis,JavaScript,,,,,,JavaScriptthis.4),ewJavaScript.,.New.:Newobject=NEWObject(Parameterstable);Newobject:object;parameterstable;newJavaScript.newData=NewData()birthday=NewData(December12.1998)NewData,birthday.4,:(1)(.)university.Name=university.city=university.Date=1999university,Name,City,Date,.(2)university[0]=university[1]=university[2]=1999,.functionshowunievsity(object)for(varj=0;j2;j++)document.write(object[j])For……in:Functionshowmy(object)for(varpropinthis)docament.write(this[prop]);(3)university[Name]=university[City]=university[Date]=19995,JavaScript.ObjectName.methods()methods()=FunctionName.universityshowmy(),:document.write(university.showmy()):document.write(university)mathcos():with(math)document.write(cos(35));document.write(cos(80));
本文标题:WEB_JavaScript 深度剖析(从入门到精通)
链接地址:https://www.777doc.com/doc-6238592 .html