Download as pdf
Download as pdf
You are on page 1of 32
UNTT—L 2c RIPTING , i ATM L >Web Page Destgnting using ; S Selipttng basles Sewer ade Scripttn _—Citent stde and 7 x > Tava Seniet > Object 3 > Names > \terals > Operators and exeresstons > Statements and Features > events > Windows > documents > fra mes i| > data types 2 iI > butit-Tn functions, | > Browser object ‘model My > Neritytng Farms >MTML 5,CSS35HT™ Ls canvas 5 Web eite Creatfon Using tosls: eee ; acep-@ t+ Open Your text edftm such as Note “ublfmetext » Cte~s. s3) ont See “Jatep-@ s-\iitte the code given below In the text } HTL | | <}boctype htmss , | < titles first HTML file < bodys Melly Everyone lt t/t sie with the «heme /. btm extebst Step @- 1 hi { U nt f OF) e with any browser . The Oatput H i -< eS): . |3 + Ttalic Tog Cxt>.,. Cor) . - to MAKE text look . * These tags are used |* The only Afiterence between

and Semantically emphasis On important text peoord whereas tag Ys used to Make & juge Used t® Make text Ttalics. le. Ordered List Cegpy--.. The H™L bag. 6. Image Taq- _ wtf * TP we Need to add an image to Our websi . We Need to Use the Fottowtng Syotar- * Server side Safpting Source code if Server | | +p the User: } | fs not \istble not depend on the Clfent side) Samim | I, Te dors | web Server. Je Te TUDS OP the le ae provides more security for data. Ln Ruby this sever cide TAVAscRtpt LITERALS <- % Lftevais Ove the WOYy yps Tepresent ” Malleeiaa |) Janaseriet - Ik These ave fixed Values that You \ieerauty Provig {9 your Applicaton. Source , and are Not evi | examples, i| \. o> 2+ BJ4i5q | 3. & Ty be Cov) Not to be” fag Thteqers :- ES Thtegers can be expressect fn decimal , hexadetinal (oy) Octal Format: | Seqene | 4 A decimal tnteger \teral Consists ob A digits cwotthout a leadf or dig m9 0, | i Soret PRY De-i0e x A String must be delimited by auotes of the Same type; that ts > ether both Sngle quotes Cor) idouble quotes. | Exavnples ¢- | xy doh? | 2) * blah? | 3) € [23u” &) “one \ne \n another Mine > Subtractfon c~) <- Subtractioo |Subtraction on two operands. EG YS Sug ees tae > Murttplication(as = Muitiplicatton (7 Operator MUMIplicatfon On two operands. fk Vests gives Yeas. > Diviston 6) - Division *]? Operatos performs diuisig | 80 two Operands. ae = =), Gives Y=d. Y Modulus geo} i Modulus “Oo operates Gives Q PO foder of an fnteger dfviston EX Aol. B Means tTematnde; \ are, qvies Ved. ‘7% 7 Operator | > Exponentiation ¢x#) ae Exe Ponen att y | Ge the power of the Aivst operatos tafsed EO the Second OPevator, | Ex e— Y=5*3 gles Yong | Bree Rhein and YSAq ai thenys teat ay, fe A=40,,.and Yet then A=q, Y=a. j ia I> UnaryC+)+ Unary © +7 fs the fastest and Prete oss J : : : way ob Converting “something Toto a Dumber. pee Means fa; ts oO Posttive Humber. BS > NegationC—9 Negation © — operates gives the negation OF an operand: | ext- —G Means *a” fis a Negatite number. } (©. Acsiqnment Operators ; The Acciqgnment operator assigns fhe Tight operand “Value €o the left Operand: | >A ddttfon Assignment r=) Cams up lett and Tight Opevand Valves and then assigns the Tesult tO the left operand. Et Y4=4 Gives Y=Yt4 > Subtraction Assignment C— =) Tt Subtracts the right Modutes / Remainder SSOP aaa ‘ §@ Variable by the \ialue ob the right Operand ees fable. assigns the temainde, to the Maria (Be Yoo =A fe canivatent to Y=Yojo A. | 17 x Eponentiatinn Assignment (Rk =): This rales Give of A Variable to the power of the wight | Operand. eu YI# LA te equivatenr to. Y=yeEA | > Lett shtet Asstgnment Ce c=)=— Tt Moves the Specitfed Amount of bfts to the let and assigns the Yeswi to the \avfable. See RiceA js equivatent to W) oNpaa. > Right shit Assignment sks =Di- Tt moves the Specfifed amvunt Ob Bs tb Lhe vight and ’ pe ME FESGle ty the \lavfabie, EXi- Vso aa Te equitatent to yy > startet Ewen (a= Sig lies the eqwattty a oo operands ustth type , Tb ‘web Vote ond ges e equal then the condftfon ts true Otherwise False: '> Trequatr ea, Tue fe Fy Cl=> ¢-Compares thequatity of $00 Operands % Operands are not equal , &i- Let x=19 then X\=it te tue. the Inequality 96 40 | fe ounce Thequarity Qe Conypares type ave both Nralue and operands with “ype fe Fequal then the condition fg te otherwise false. Peper ee x=10 tne? ig? (2rd @ begicat Operators These Operadare are used €0 \ 1 ) \alues- determine the Ricci ad \raviables Gor) ON ¢ py whether two operands > Logical ANP Cab) 4 o¢ n we \ast operand \f Qre Non~zerc pe | wight: vohen evaluating 22627 iC he operand. pees. and X=0 Bar sbiGirxds8 05, i ©. Bitwise Operator “The bitwise Operator Tavasertpt fs used to cowert the Humber 32-bit binary number and Perform the bi “operation . S Bitwise AND (4): The operator returns tue | & both the operands OC true: Exes 6 ) B=4 AAB=0 > Bitutse ORCS The Operator veturns True even feamcnaoe the’ Operands is +e Sie = 6 » B=4 8 Bia. 7 Bitttse XOR CA) The Operator retitrns mle fe both Operates Gre distinct - EL A=6 , ead “oO = (odin this to “opera ly piwise Rgbt shibt : axe used where the first Operand tS the «ie number 24 the Second operand % the nuinber Of ee tO ehirt to “the Yight- exr- «=O HB pHs Se eS ESSTONS 2— [=> JAVASCRIPT EXPR i Tavascri pt expression Ts O Mtattd set Of NREKGISS I raxtabl les > operators , and expressions that ealuate ‘a single statue that fs an expression , be a number, a sting, Cov) On the expressfon , } | | | lt The cfrale Nalue can | Ms atnqte N ) | lenendtna \ Cependtng iO \aqica\ \talue |" Toxraserip* ie Expressions | t> this keyword * code’s execution that cebines the Current ne Ob context’ ity Auoalt Lyunetton w- Checks chat, (Oe Ce searing | the execut{on Ahread: {iid Grouping Operator o~ the Qrouping operator consfsts y at Pars OF Patentthesis Ground an exptession - ob O || f+ Semfeolons t- X fy a * Semrcnions separate Jovascript Statements # A semicolon marks the A | Javascript: | 1. Code Blocks 4— 1% Tovaseripe Statements can be Grouped togeth ‘Insfde Curly brackets ; Such Qroups are Enduan 1 Code ‘blocks. * The Purpdse ob Grouping is to destne Staton to be executed together, rr f, lthfce Space z- * Javascript ignores Muit’ple White Spaces, Ww Lie length and ine Breays : % Tavaseifpe coders preferred The length by Most Programmes fs Upto Ro Characters! * The Best Place td bear a 7 8 cede lire javascript > te ft doesn Fe » fs agter an Operator + ~e a loop and - tfeutay teeratfon & a \oop and move a mido x greratlon- Mee. while t-SIn this 5 gre axareroents UBTTEEED - yorrtten the do biock are “execu etn A in whfle "Ss “EU + a eondttion meoy helps *9 executing @ block OF ctatements a the candftion ff tTUC: 4d -_— a This eles wm executlng F block OF on dfererent cases. des dependtng = TAVASCR TET EEATURES 27 fs one ob the Most popular programing \* Tavascript ‘ purmerDus Reatures cohen Tt sanquag es Jeve lopment: gores;, *° Lanquage ‘- ecrfoting ang Wage handlthg fm the Ae Liqht welqnt ecripttng Uiqhtwe iqht for dota a e 4 Towaceriet 7 because fa Pogie ctient side: browser Co) the fs meant for fouasevipt ts web appricatfons 7 hence Q great Reature: cient — eide has Because the light weight eecution Fo" fanaser Vp fs Pature OF Di 3+ Obfect —ovfented programming Support ¢- BE “Startog nm ES6 , “the Concept oF Claceaam Oop fs better deffned. 7. Obfect Creatdn Patterns, | W. Code Reuse patterns. | [4 Prototype—based language ¢— \* Tavasuipt is a prototype ~ based seripting languay i }% This means javascript uses prototypes Tostead Foy Classes Cor) tne tance. | => TAVASCRIPT EVENTS 2- |& Tavaseripts has elvents +0 Provide a dynamic | Interface tO a tueb Page: | * These “ents Are hookeqg to elements (maa Bocument abject Made Croom), + uohenever the which ‘handles ociated worth ty. Tavaser' pt onmouseout event the element ouse Cursor \eqves a Aunction ass! | 1a mouseout evento res executed. e event 2 This event detects ae Tavascy et onchang etefpents4e eae to the Change fe, Nolite Ob; ous iis 6 event » When an. element Ss B: Jouoscrpt 0 exrent * event fs ennke a: \oadecl = con pletely 9 ot 2 Ke! fot #. Tavoseript or us event fn elemens \isting So thi nA 0 fretructtons voheneN er (e Yecet uw g, Sonacerit arsbhuy., ents ts event tS extoked loses | NOMS - MEM oct 8 ai Cee The Window 1S the giebat seas Weck Functions , etc’ i Syptoe: usindow Object: Ustndow. Propertyname SKampie ¢ Uoindoug. Cocument. ttle wit Teturn the title of the document: | > DOCUMENTS + | . a | & Tk represents the document toaded \neide the \ window Cor) browser. ee The properties welared to ft gre stored fy the document — abject | ie Tt fg \waded OKKEY the \oading window because tuiintows —Contalng a document, wre ae the: OK Alement of the cloctiment Object meade. web browser ughere each section x bh Frameset taq Is the Catection OF es. . the brouwdsey goindow: ee Creatio g Fyames 27> zag , USE Lrameset *23 |. Snstead of uding body fp WML use Frames fr) web lovowser- fy Bur ths Toq fs deprecaced tp | ly che Framest coq fs 4 wo detne how aa | divide the Iprowset: TL S* use Endicated ©Y frame tag and Te deca, Goeumentcel Smee den & x Each *vame i. | basically detines Frome - conic nw khe Hi Rrncs OTM. g | Atri butes Ot fa C's % ed to Create arentical cals oxy bute iS is mn The ‘ . . | frames to web AiOW SET | ‘ nue th | * This atcetbuce ge Hasicaty used etine e np: 0b anaes Cue ae size Tnside trame set > borders acces AThis attribute OF romeset tag ebtnes the ' width of border oF 0th Frames fr pixels, od | i % Zero Value 1S used fos no border: Example :— . | Fomeborder ¢— pA This attibute oF frameset taq 15 Used toe ‘Spediy whether the three— dtmensitnal border” ‘shoud be displayed beeen the framed Cor) freee Uso 50 Altues 0 ana ae vohere © defines for no border and vtatue 4 signittes toy Yes there wit be border, Tava seript double- prettsibn &- let dum =2 3 Wer MUM2 = 135 Jet Duma= Topintty 5 pve of tet puMlys “Something here to0 7/25 ‘ > Sting + Javascript stings are simtlay to Sentences, they are made up OF © Ast off Characters, vahich , lfc essentially just a0 warray oF Characters 9 Atke ” | Hetto GeeksfoyGeers ete >> exe lec str= “ Hello There” 3 let stra = t single qotes works #nel5 tet Phrase = © can embed 3 Co uta > Boolean: Represent Logical entity And CoM hove two Values * tue (ov) false: ex: \et is coding Ea yUC 4 | let fsoid = false; S Nuit This undefined 2 A Ntowiabie that has ot Seo assigned ewes ts defined } &* Net 15 Console 10g0c) 5 : erew ObfeCLOd 5 et perso =f} 5 => BOILT —TN- FUNCTIONS 4— A. eXlat 4 and a” eNg\ eNAluates a shing aruated , and \s seturned 4 fe the. Yesuit § S Fonasertot PrOGraM ve the Yesurt is + Expressfon Ne et QO sing, athe vesutt a Shing, *t ie taken 0 be O | and ve *S evaluated | eae On 2 Noy 4 =39 Sowa 2? Print Ceual Choe +4 44)) Printin (eval C29) 2. paryseTnt: - j e & Shing Argument and Yetiws aM Nteqer Of ‘he Specisted Yodry Cor) base a Csiving) ParseTint Cohtng jradtx 5 - passe Int Cr1sk 3”, 1) “parse Float © “4 Parses Sing — A*Qument and veturns a % point umber. ; syntax s PASE Float Caring) CS een ext- parse Float Cea") Parse Float (%3iy e-2") Parse Eloat (80.0 stuE+2") Vax x = au’ | Parse Float (x). | Y, escape * | ARetuns +he beradectmar encoding of AN aArTQuUIMEnt muthe Sso Lotln-i character Set -° } | Syprax! escape Cs shing ”) Pex: escape (Ge alec & ° fs”) \ 5. Unescape: lec wa ening adv the Specttted Value. | Returng He ascrs g i i | Syprax & Unescave C* aang”) me ex, Unescape Case . inor een.width 1 The Soreen-Width Proper Userig Screen Wath in pixels. BY

< Sept > document - get Element By 74 Gara ).Soner tiny 4 6 Fe “The Screen voit Is “+ Screen. ug Ae ertors I> Sereen- height % The Screen-helgnt Property Tetuing ithe Users Screen hefgnt fn pixels : | xe |

< py | | document.qerElement By td Cs QE a”) Wnner HTML= | ee et: The Screen height is) TSereen height 5 } > Screen auatiuidth + The Screen. avatiuidth » property tetuyne the Users Screen width {) ptrels 4 excluding the iwrerface features. EB dp td's gaan ies . document “get Element ByTd Cera”) toner HME document: gertklem ert Byt ff The Qvatlaletiity Screen Liseript>' > Sereend- eoinidepth s The 5 i meruins the rts 0 color: Ze to= “* ara” >i p> gseri pt > document: getElement Byt d X [sonet> y Screen prxetoePth the pixel depth of the ext Zpid= tere”>