Free Essay

Javascript in Persian

In:

Submitted By a985
Words 2878
Pages 12
‫‪www.IrPDF.com‬‬
‫آﻣﻮزش ﮐﺎرﺑﺮدي ﺟﺎوااﺳﮑﺮﯾﭙﺖ‬

‫ﺑﻪ ﻧﺎم ﺧﺪا‬

‫ﻧﻮﯾﺴﻨﺪه : اﺣﻤﺪ ﺑﺎدﭘﯽ‬

‫آﻣﻮزش ‪) JAVASCRIPT‬ﻻﯾﻪ ﺳﻮم از ﻃﺮاﺣﯽ وب(‬
‫ﺑﺮﮔﺮﻓﺘﻪ از ﮐﺘﺎب :‬

‫‪Professional JavaScript for Web Developers‬‬
‫‪By : Nicholas C.Zakas‬‬

‫آﺷﻨﺎﯾﯽ ﺑﺎ ﻣﻔﺎﻫﯿﻢ ﭘﺎﯾﻪ ‪javascript‬‬
‫ﮐﺎر ﺑﺎ آراﯾﻪ ﻫﺎ و رﺷﺘﻪ ﻫﺎ‬
‫آﺷﻨﺎﯾﯽ ﺑﺎ اﻧﻮاع اﺷﯿﺎء ، ﻣﺘﺪﻫﺎ و ﺧﻮاﺻﺸﺎن‬
‫آﺷﻨﺎﯾﯽ ﺑﺎ ﻣﺪل ﺷﯽ ﮔﺮاي ﻣﺮورﮔﺮ )‪(BOM‬‬
‫آﺷﻨﺎﯾﯽ ﺑﺎ ﻣﺪل ﺷﯽ ﮔﺮاي ﺳﻨﺪ )‪(DOM‬‬
‫ﺑﺮرﺳﯽ و روش ﮐﻨﺘﺮل روﯾﺪاد ﻫﺎ در ﺟﺎوااﺳﮑﺮﯾﭙﺖ‬
‫آﻣﻮزش ﮐﺎر ﺑﺎ ﻓﺮم ﻫﺎ و ﺟﺪاول از ﻃﺮﯾﻖ ﺟﺎوااﺳﮑﺮﯾﭙﺖ‬
‫اراﺋﻪ اﻧﻮاع ﻣﺜﺎل ﻫﺎ و ﻧﻤﻮﻧﻪ ﮐﺪ ﻫﺎ‬
‫و ...‬

‫ﻧﻮﯾﺴﻨﺪه : اﺣﻤﺪ ﺑﺎدﭘﯽ‬

‫داﻧﺸﮕﺎه ﭘﯿﺎم ﻧﻮر ﻣﺮﮐﺰ آران و ﺑﯿﺪﮔﻞ‬
‫اﻧﺘﻘﺎدات و ﭘﯿﺸﻨﻬﺎدات ﺧﻮد را از ﻃﺮﯾﻖ اﯾﻤﯿﻞ زﯾﺮ ﻣﻄﺮح ﻧﻤﺎﯾﯿﺪ :‬

‫‪ahmadbadpey@gmail.com‬‬
‫١‬

‫‪www.IrPDF.com‬‬

‫‪www.IrPDF.com‬‬
‫ﻧﻮﯾﺴﻨﺪه : اﺣﻤﺪ ﺑﺎدﭘﯽ‬

‫آﻣﻮزش ﮐﺎرﺑﺮدي ﺟﺎوااﺳﮑﺮﯾﭙﺖ‬

‫اﻧﻮاع زﺑﺎن ﻫﺎي ﺑﺮﻧﺎﻣﻪ ﻧﻮﯾﺴﯽ ﺗﺤﺖ وب‬
‫ﻫﻤﺎﻧﻄﻮر ﮐﻪ ﻣﯽ داﻧﯿﺪ ﮐﺎﻣﭙﯿﻮﺗﺮ ﻫﺎي ﻣﻮﺟﻮد در ﺷﺒﮑﻪ اﯾﻨﺘﺮﻧﺖ را ﺑﻪ دو دﺳﺘﻪ اﺻﻠﯽ ﺗﻘﺴﯿﻢ ﻣﯽ ﮐﻨﻨﺪ . ﮐﺎﻣﭙﯿﻮﺗﺮ ﻫﺎي ﮐﺎرﺑﺮ )‪ (client‬و‬
‫ﮐﺎﻣﭙﯿﻮﺗﺮ ﻫﺎي ﺳﺮور )‪ . (server‬زﺑﺎن ﻫﺎي ﺑﺮﻧﺎﻣﻪ ﻧﻮﯾﺴﯽ ﺗﺤﺖ وب ﻧﯿﺰ ﺑﻪ دو دﺳﺘﻪ ﺗﺤﺖ ﮐﺎرﺑﺮ )‪ (Client Side‬و ﺗﺤﺖ ﺳﺮور‬
‫)‪ (server side‬ﺗﻘﺴﯿﻢ ﺑﻨﺪي ﻣﯽ ﺷﻮﻧﺪ .‬

‫زﺑﺎن ﻫﺎي ﺗﺤﺖ ﮐﺎرﺑﺮ زﺑﺎن ﻫﺎﯾﯽ ﻫﺴﺘﻨﺪ ﮐﻪ ﺑﻮﺳﯿﻠﻪ ﻣﺮورﮔﺮ و ﻓﻘﻂ ﺑﺮ روي ‪ client‬ﻫﺎ اﺟﺮا ﻣﯽ ﺷﻮﻧﺪ . در واﻗﻊ ﺑﺮاي اﺟﺮاي اﯾﻦ ﮔﻮﻧﻪ زﺑﺎن‬
‫ﻫﺎ ﺑﻪ ﺳﺮور ﻫﺎ ﻧﯿﺎزي ﻧﯿﺴﺖ . زﺑﺎن ﻫﺎﯾﯽ ﻫﻤﭽﻮن ‪ HTML , CSS , JAVASCRIPT‬از اﯾﻦ دﺳﺖ ﻫﺴﺘﻨﺪ . از اﯾﻦ زﺑﺎن ﻫﺎ ﻣﻌﻤﻮﻻ‬
‫ﺑﻪ ﺗﻨﻬﺎﯾﯽ ﺑﺮاي اﯾﺠﺎد ﺳﺎﯾﺖ ﻫﺎي ﺑﺎ ﻣﺤﺘﻮاي ﺛﺎﺑﺖ ﮐﻪ اﺻﻄﻼﺣﺎ ﺑﻪ آن ﻫﺎ ﺳﺎﯾﺖ ﻫﺎي ‪) static‬اﯾﺴﺘﺎ( ﻣﯽ ﮔﻮﯾﻨﺪ اﺳﺘﻔﺎده ﻣﯽ ﺷﻮد .‬
‫در ﻣﻘﺎﺑﻞ اﯾﻦ زﺑﺎن ﻫﺎ ، زﺑﺎن ﻫﺎي ﺗﺤﺖ ﺳﺮور وﺟﻮد دارﻧﺪ ﮐﻪ ﺑﺮاي اﺟﺮا ﻧﯿﺎز ﺑﻪ ﺳﺮور ﻫﺎ داﺷﺘﻪ و ﻣﯽ ﺑﺎﯾﺴﺖ ﺑﺮاي اﺟﺮا ﺣﺘﻤﺎ ﺑﺮ روي ﺳﺮور‬
‫ﻫﺎ ﻗﺮار ﺑﮕﯿﺮﻧﺪ . اﯾﻨﮕﻮﻧﻪ زﺑﺎن ﻫﺎ اﻣﮑﺎن ﺑﺮﻗﺮاري ارﺗﺒﺎط ﺑﺎ ﭘﺎﯾﮕﺎه داده )‪ (Database‬را دارﻧﺪ. زﺑﺎن ﻫﺎﯾﯽ ﻫﻤﭽﻮن ‪ ASP ، PHP‬و ‪JSP‬‬
‫از اﯾﻦ دﺳﺖ ﻫﺴﺘﻨﺪ . از اﯾﻦ زﺑﺎن ﻫﺎ ﺑﺮاي اﯾﺠﺎد ﺳﺎﯾﺖ ﻫﺎي ﺑﺎ ﻣﺤﺘﻮاي ﭘﻮﯾﺎ ﮐﻪ اﺻﻄﻼﺣﺎ ﺑﻪ آن ﻫﺎ ﺳﺎﯾﺖ ﻫﺎي ‪) dynamic‬ﭘﻮﯾﺎ( ﮔﻔﺘﻪ‬
‫ﻣﯽ ﺷﻮد اﺳﺘﻔﺎده ﻣﯽ ﺷﻮد .‬
‫زﺑﺎن ‪ JavaScript‬ﯾﮑﯽ از زﺑﺎن ﻫﺎي ﻣﻬﻢ ﺑﺮﻧﺎﻣﻪ ﻧﻮﯾﺴﯽ وب و ﺗﺤﺖ ﮐﺎرﺑﺮ )‪ (client-side‬ﻣﯽ ﺑﺎﺷﺪ. اﯾﻦ زﺑﺎن اوﻟﯿﻦ ﺑﺎر در ﺳﺎل‬
‫۵٩٩١ اراﺋﻪ ﺷﺪ و وﻇﯿﻔﻪ آن ﺗﻨﻬﺎ ارزش ﺳﻨﺠﯽ ﻋﻨﺎﺻﺮ ﻓﺮم ﺑﻮد.‬
‫‪Document Object Model : DOM‬‬
‫‪ DOM‬ﯾﮑﯽ از ‪ API‬ﻫﺎ )راﺑﻂ ﯾﺎ ﻣﯿﺎﻧﺠﯽ ﺑﺮﻧﺎﻣﻪ ي ﮐﺎرﺑﺮدي( ﺑﺮاي زﺑﺎن ﻫﺎي ﻣﻬﻢ ‪ HTML‬و ‪ XML‬ﺑﻪ ﺷﻤﺎر ﻣﯽ رود.‬
‫‪ DOM‬ﺗﻤﺎم ﻋﻨﺎﺻﺮ ﻣﻮﺟﻮد در ﯾﮏ ﺻﻔﺤﻪ وب را ﺑﻪ ﺻﻮرت درﺧﺘﯽ از ﮔﺮه ﻫﺎ )‪ (node‬ﻧﻤﺎﯾﺶ ﻣﯽ دﻫﺪ .‬
‫‪ DOM‬ﺑﺎ ﺗﺮﺳﯿﻢ درﺧﺘﯽ ﻓﺮﺿﯽ از ﻋﻨﺎﺻﺮ ﻣﻮﺟﻮد در ﯾﮏ ﺻﻔﺤﻪ ي وب اﻣﮑﺎن ﺑﯽ ﻧﻈﯿﺮي ﺑﻪ ﻃﺮاﺣﺎن وب ﺑﺮاي ﮐﻨﺘﺮل ﺑﺮ آن ﻫﺎ ﻣﯽ دﻫﺪ.‬
‫ﮔﺮه ﻫﺎ ﺑﺎ اﺳﺘﻔﺎده از ‪ DOM‬ﻣﯽ ﺗﻮاﻧﻨﺪ ﺑﻪ راﺣﺘﯽ ﺣﺬف , اﺿﺎﻓﻪ و ﯾﺎ ﺟﺎﺑﺠﺎ ﺷﻮﻧﺪ .‬
‫‪Browser Object Model : BOM‬‬
‫ﯾﮑﯽ دﯾﮕﺮ از ‪ API‬ﻫﺎي ﺳﺎﺧﺘﻪ ﺷﺪه ﺑﺮاي ‪ HTML‬ﮐﻪ ﺑﻪ ﻋﻨﻮان ﯾﮑﯽ از وﯾﮋﮔﯽ ﻫﺎي ﻣﻨﺤﺼﺮ ﺑﻪ ﻓﺮد ﻣﺮورﮔﺮﻫﺎي ‪ IE‬و ‪Netscape‬‬
‫ﻧﯿﺰ ﺷﻨﺎﺧﺘﻪ ﻣﯽ ﺷﻮد ‪ BOM‬اﺳﺖ.‬
‫٢‬

‫‪www.IrPDF.com‬‬

‫‪www.IrPDF.com‬‬
‫ﻧﻮﯾﺴﻨﺪه : اﺣﻤﺪ ﺑﺎدﭘﯽ‬

‫آﻣﻮزش ﮐﺎرﺑﺮدي ﺟﺎوااﺳﮑﺮﯾﭙﺖ‬

‫از ‪ BOM‬ﺑﺮاي دﺳﺘﺮﺳﯽ و دﺳﺘﮑﺎري وﯾﮋﮔﯽ ﻫﺎي ﭘﻨﺠﺮه ﯾﮏ ﻣﺮورﮔﺮ ﻣﯽ ﺗﻮان اﺳﺘﻔﺎده ﮐﺮد.‬
‫ﻃﺮاﺣﺎن وب ﺑﺎ اﺳﺘﻔﺎده از ‪ BOM‬ﻣﯽ ﺗﻮاﻧﺪ ﮐﺎرﻫﺎﯾﯽ ﻫﻤﭽﻮن ﺟﺎﺑﺠﺎﯾﯽ ﭘﻨﺠﺮه ﻫﺎ و ﺗﻐﯿﯿﺮ ﻣﺘﻦ ﻣﻮﺟﻮد در ﻧﻮار وﺿﻌﯿﺖ ﻣﺮورﮔﺮ و دﯾﮕﺮ‬
‫ﮐﺎرﻫﺎﯾﯽ ﮐﻪ ارﺗﺒﺎط ﻣﺴﺘﻘﯿﻤﯽ ﺑﺎ ﻗﺴﻤﺖ ‪ Content‬ﺳﻨﺪ ﻧﺪارد اﻧﺠﺎم دﻫﻨﺪ .‬
‫ﻣﻌﻤﻮﻵ ‪ BOM‬ﺑﺎ ﭘﻨﺠﺮه ﻫﺎ و ﻓﺮﯾﻢ ﻫﺎ ﺳﺮ و ﮐﺎر داﺷﺘﻪ و ﻣﯽ ﺗﻮان از ﻃﺮﯾﻖ آن ﮐﺎرﻫﺎي زﯾﺮ را اﻧﺠﺎم داد :‬
‫‪ ‬ﺑﺎز ﮐﺮدن ﭘﻨﺠﺮه ﻫﺎي ‪. Popup‬‬
‫‪ ‬ﺗﻮاﻧﺎﯾﯽ ﺑﺎزﮐﺮدن ﭘﻨﺠﺮه ﻫﺎي ﺟﺪﯾﺪ و ﺗﻐﯿﯿﺮ اﻧﺪازه و ﺟﺎﺑﺠﺎﯾﯽ و ﯾﺎ ﺑﺴﺘﻦ آن ﻫﺎ .‬
‫‪ ‬ﺑﺪﺳﺖ آوردن اﻃﻼﻋﺎﺗﯽ از ﻣﺮورﮔﺮ )ﻧﻮع , ورژن و ...( .‬
‫‪ ‬ﺑﺪﺳﺖ آوردن اﻃﻼﻋﺎﺗﯽ در ﻣﻮرد ﺳﻨﺪ و ﻣﻮﻗﻌﯿﺖ ﺻﻔﺤﻪ اي ﮐﻪ در ﻣﺮورﮔﺮ ﺑﺎز ﺷﺪه اﺳﺖ .‬
‫‪ ‬ﺑﺪﺳﺖ آوردن اﻃﻼﻋﺎﺗﯽ در ﻣﻮرد وﺿﻮح )‪ (resolution‬ﺻﻔﺤﻪ ﻧﻤﺎﯾﺶ ﮐﺎرﺑﺮ .‬
‫‪ ‬ﭘﺸﺘﯿﺒﺎﻧﯽ از ‪ Cookie‬ﻫﺎ .‬
‫ﺑﻪ دﻟﯿﻞ اﯾﻨﮑﻪ ﻫﯿﭻ ﮔﻮﻧﻪ اﺳﺘﺎﻧﺪاردي ﺑﺮاي ‪ BOM‬وﺟﻮد ﻧﺪارد ﻫﺮ ﻣﺮورﮔﺮ ﻣﻤﮑﻦ اﺳﺖ ﺑﻪ ﺻﻮرﺗﯽ ﻣﺘﻔﺎوت از آن ﭘﺸﺘﯿﺒﺎﻧﯽ ﮐﻨﺪ. ﻣﺎﻧﻨﺪ اﺷﯿﺎء‬
‫‪ Window‬و ‪ Navigator‬ﮐﻪ ﻫﺮ ﻣﺮورﮔﺮ ﻣﺘﺪﻫﺎ و ﺧﺎﺻﯿﺖ ﻫﺎي ﻣﻨﺤﺼﺮ ﺑﻪ ﻓﺮدي ﺑﺮاي آن ﻫﺎ ﺗﻌﺮﯾﻒ ﮐﺮده اﺳﺖ.‬
‫اﯾﻨﮏ ﺑﻪ ﭼﻨﺪ ﻣﻔﻬﻮم اﺻﻠﯽ در زﺑﺎن ‪ JavaScript‬ﻣﯽ ﭘﺮدازﯾﻢ :‬
‫‪ ‬ﺟﺎوا اﺳﮑﺮﯾﭙﺖ ‪ Case-Sensitive‬اﺳﺖ : ﯾﻌﻨﯽ ﻫﻤﻪ ﭼﯿﺰ ﻣﺎﻧﻨﺪ ﻧﺎم ﻣﺘﻐﯿﺮ ﻫﺎ ، ﻧﺎم ﺗﻮاﺑﻊ ، ﻋﻤﻠﮕﺮ ﻫﺎ و ﻫﺮ ﭼﯿﺰ دﯾﮕﺮي‬
‫ﻧﺴﺒﺖ ﺑﻪ ﺣﺮوف ﮐﻮﭼﮏ و ﺑﺰرگ ﺣﺴﺎس اﺳﺖ . ﺑﻪ ﻋﻨﻮان ﻣﺜﺎل ﻣﺘﻐﯿﺮي ﺑﺎ ﻧﺎم ‪ Test‬ﺑﺎ ﻣﺘﻐﯿﺮي ﺑﺎ ﻧﺎم ‪ test‬ﻣﺘﻔﺎوت اﺳﺖ.‬
‫‪ ‬ﻣﺘﻐﯿﺮﻫﺎ ﺑﺪون ﻧﻮع ﻫﺴﺘﻨﺪ : ﺑﺮﺧﻼف زﺑﺎن ﻫﺎﯾﯽ ﻫﻤﭽﻮن ‪ java‬و ‪ , C‬ﻣﺘﻐﯿﺮﻫﺎ ﻧﻮع ﺧﺎﺻﯽ ﻧﻤﯽ ﮔﯿﺮﻧﺪ. در ﻋﻮض ﻫﺮ ﻣﺘﻐﯿﺮ‬
‫ﻣﯽ ﺗﻮاﻧﺪ ﺑﺎ ﮐﻠﻤﻪ ﮐﻠﯿﺪي ‪ var‬ﺗﻌﺮﯾﻒ ﺷﺪه و ﻣﻘﺪاري را ﺑﻪ ﻋﻨﻮان ﻣﻘﺪار اوﻟﯿﻪ ﺑﭙﺬﯾﺮد . در واﻗﻊ ﻣﺘﻐﯿﺮﻫﺎ "ﻣﻘﺪار ﮔﺮا" ﻫﺴﺘﻨﺪ. ﯾﻌﻨﯽ‬
‫در ﻫﻨﮕﺎﻣﯽ ﮐﻪ ﺗﻌﺮﯾﻒ )ﻣﻘﺪاردﻫﯽ( ﻣﯽ ﺷﻮﻧﺪ ﻧﻮﻋﺸﺎن ﻧﯿﺰ ﻣﺸﺨﺺ ﻣﯽ ﮔﺮدد .‬
‫‪ ‬ﻗﺮار دادن );( در اﻧﺘﻬﺎي ﻫﺮ دﺳﺘﻮر اﺧﺘﯿﺎري اﺳﺖ : دﺳﺘﻮرات در ﺟﺎوا اﺳﮑﺮﯾﭙﺖ ﻣﯽ ﺗﻮاﻧﻨﺪ ﺑﻪ );( ﺧﺘﻢ ﺷﻮﻧﺪ ﯾﺎ ﻧﺸﻮﻧﺪ. در‬
‫ﺻﻮرت ﻗﺮار ﻧﺪادن );( ، ﺟﺎوا اﺳﮑﺮﯾﭙﺖ اﻧﺘﻬﺎي ﻫﺮ ﺧﻂ را ﺑﻪ ﻋﻨﻮان ﭘﺎﯾﺎن دﺳﺘﻮر در ﻧﻈﺮ ﺧﻮاﻫﺪ ﮔﺮﻓﺖ. اﻣﺎ روش ﺻﺤﯿﺢ ، اﺳﺘﻔﺎده‬
‫از );( در اﻧﺘﻬﺎي دﺳﺘﻮرات اﺳﺖ. ﭼﻮن ﺑﻌﻀﯽ از ﻣﺮورﮔﺮﻫﺎ از روش اول ﭘﺸﺘﯿﺒﺎﻧﯽ ﻧﻤﯽ ﮐﻨﺪ و ﻣﻤﮑﻦ اﺳﺖ در اﺟﺮاي ﮐﺪﻫﺎ دﭼﺎر‬
‫ﻣﺸﮑﻞ ﺷﻮﻧﺪ.‬
‫‪ ‬درج ﺗﻮﺿﯿﺤﺎت در ﺟﺎوا اﺳﮑﺮﯾﭙﺖ : ﺑﺮاي درج ﺗﻮﺿﯿﺤﺎت در ﻣﯿﺎن ﮐﺪﻫﺎ از روش ﻫﺎي زﺑﺎن ﻫﺎي ﺑﺮﻧﺎﻣﻪ ﻧﻮﯾﺴﯽ ﻫﻤﭽﻮن ‪C‬‬
‫و ++‪ C‬ﻣﯽ ﺗﻮان اﺳﺘﻔﺎده ﻧﻤﻮد ﯾﻌﻨﯽ از // ﯾﺎ /* */ :‬
‫‪//this is a single-line comment‬‬
‫‪/* this is a multiline‬‬
‫/* ‪comment‬‬

‫ﻣﺘﻐﯿﺮﻫﺎ )‪ (Variables‬در ﺟﺎوا اﺳﮑﺮﯾﭙﺖ‬
‫ﻣﺘﻐﯿﺮ ﻫﺎ ﺑﺎ ﮐﻠﻤﻪ ‪ var‬ﺗﻌﺮﯾﻒ ﻣﯽ ﺷﻮﻧﺪ. ﻣﺎﻧﻨﺪ :‬
‫;'‪test ='ali‬‬

‫‪Var‬‬

‫در اﯾﻦ ﻣﺜﺎل ﻣﺘﻐﯿﺮي ﺑﺎ ﻧﺎم ‪ test‬اﻋﻼن ﺷﺪه و ﻣﻘﺪار اوﻟﯿﻪ '‪ 'ali‬را ﻣﯽ ﮔﯿﺮد.‬
‫ﭼﻮن ﻣﺘﻐﯿﺮﻫﺎ ﺑﺪون ﻧﻮع ﻫﺴﺘﻨﺪ ﻣﻔﺴﺮ ﺟﺎوا اﺳﮑﺮﯾﭙﺖ ﺧﻮد ﺑﻪ ﺧﻮد ﻧﻮع ‪ test‬را ‪ String‬در ﻧﻈﺮ ﻣﯽ ﮔﯿﺮد.‬
‫ﻣﺎ ﻫﻤﭽﻨﯿﻦ ﻣﯽ ﺗﻮاﻧﯿﻢ دو ﯾﺎ ﭼﻨﺪ ﻣﺘﻐﯿﺮ را ﻫﻤﺰﻣﺎن ﺗﻌﺮﯾﻒ ﮐﻨﯿﻢ.‬
‫; '‪test 1='ali' , test2='salam‬‬
‫٣‬

‫‪www.IrPDF.com‬‬

‫‪Var‬‬

‫‪www.IrPDF.com‬‬
‫ﻧﻮﯾﺴﻨﺪه : اﺣﻤﺪ ﺑﺎدﭘﯽ‬

‫آﻣﻮزش ﮐﺎرﺑﺮدي ﺟﺎوااﺳﮑﺮﯾﭙﺖ‬

‫ﺑﺎﯾﺪ ﺗﻮﺟﻪ داﺷﺘﻪ ﺑﺎﺷﯿﻢ ﻣﺘﻐﯿﺮﻫﺎﯾﯽ ﮐﻪ ﺑﺎ ﯾﮏ ‪ Var‬ﺗﻌﺮﯾﻒ ﻣﯽ ﺷﻮد ﻣﻤﮑﻦ اﺳﺖ ﻧﻮع ﯾﮑﺴﺎﻧﯽ ﻧﺪاﺷﺘﻪ ﺑﺎﺷﻨﺪ.‬
‫;52=‪test_1='ali' , age‬‬

‫‪Var‬‬

‫ﺑﺮﺧﻼف ﺟﺎوا )‪ (Java‬ﻣﺘﻐﯿﺮﻫﺎ ﻣﯽ ﺗﻮاﻧﻨﺪ ﻣﻘﺪار اوﻟﯿﻪ ﻧﮕﯿﺮﻧﺪ.‬
‫; ‪test‬‬

‫‪Var‬‬

‫‪ ‬ﺑﺮﺧﻼف ﺟﺎوا ﻣﺘﻐﯿﺮﻫﺎ ﻣﯽ ﺗﻮاﻧﻨﺪ در زﻣﺎن ﻫﺎي ﻣﺨﺘﻠﻒ ﻣﻘﺪارﻫﺎي ﻣﺘﻔﺎوﺗﯽ داﺷﺘﻪ ﺑﺎﺷﻨﺪ . اﯾﻦ ﯾﮑﯽ از اﻣﺘﯿﺎزات ﻣﺘﻐﯿﺮ‬
‫ﻫﺎي ﺑﺪون ﻧﻮع در زﺑﺎن ﺟﺎوا اﺳﮑﺮﯾﭙﺖ ﺑﻪ ﺷﻤﺎر ﻣﯽ رود.‬

‫; "‪Var test ="hi‬‬
‫;)‪alert(test‬‬
‫‪// hi‬‬
‫;55=‪Test‬‬
‫;)‪alert(test‬‬
‫55 //‬

‫ﻧﺎﻣﮕﺬاري ﻣﺘﻐﯿﺮ ﻫﺎ :‬
‫ﻧﺎﻣﮕﺬاري ﻣﺘﻐﯿﺮﻫﺎ ﻣﯽ ﺑﺎﯾﺴﺖ ﺷﺮاﯾﻂ زﯾﺮ را داﺷﺘﻪ ﺑﺎﺷﺪ :‬
‫اوﻟﯿﻦ ﮐﺎراﮐﺘﺮ ﻣﺘﻐﯿﺮ ﻣﯽ ﺗﻮاﻧﺪ ﯾﮏ ﺣﺮف , ﯾﮏ ) _ ( ‪ Underline‬و ﯾﺎ ﯾﮏ ﻋﻼﻣﺖ $ ﺑﺎﺷﺪ.‬
‫1.‬
‫ﺑﻘﯿﻪ ﮐﺎراﮐﺘﺮﻫﺎ ﻣﯽ ﺗﻮاﻧﻨﺪ از $ , ‪ Underline‬و ﯾﺎ ﻫﺮ ﺣﺮف و ﻋﺪدي ﺑﺎﺷﻨﺪ.‬
‫2.‬
‫ﺗﻤﺎم ﻣﺘﻐﯿﺮ ﻫﺎي زﯾﺮ ﺻﺤﯿﺢ ﻫﺴﺘﻨﺪ :‬
‫; ‪test‬‬
‫; ‪$test‬‬
‫; 1$‬
‫; 2‪_$test‬‬

‫‪Var‬‬
‫‪var‬‬
‫‪var‬‬
‫‪var‬‬

‫ﯾﮑﯽ دﯾﮕﺮ از اﻣﺘﯿﺎزات و ﯾﺎ ﺷﺎﯾﺪ ﺟﺬاﺑﯿﺖ ﻫﺎي ‪) Java Script‬ﮐﻪ در ﺧﯿﻠﯽ از زﺑﺎن ﻫﺎي ﺑﺮﻧﺎﻣﻪ ﻧﻮﯾﺴﯽ دﯾﮕﺮ وﺟﻮد ﻧﺪارد( اﯾﻦ اﺳﺖ ﮐﻪ‬
‫ﻻزم ﻧﯿﺴﺖ ﮐﻪ ﻣﺘﻐﯿﺮ ﻫﺎ را ﻗﺒﻞ از ﻣﻘﺪار دﻫﯽ ، اﻋﻼن ﮐﻨﯿﻢ :‬
‫;"‪var sTest="hello‬‬
‫;"‪sTest2=sTest + "world‬‬
‫‪alert (sTest2); // hello world‬‬

‫در ﻣﺜﺎل ﻓﻮق ﻣﺘﻐﯿﺮ 2‪ sTest‬ﻗﺒﻞ از ﻣﻘﺪاردﻫﯽ اﻋﻼن ﻧﺸﺪه اﺳﺖ .‬
‫ﻣﻮﻗﻌﯽ ﮐﻪ ﻣﻔﺴﺮ ﺑﻪ ﭼﻨﯿﻦ ﻣﺘﻐﯿﺮﻫﺎي ﮐﻪ ﺑﺪون اﻋﻼن ﺷﺪن ﻣﻘﺪاردﻫﯽ ﻣﯽ ﺷﻮﻧﺪ , ﻣﯽ رﺳﺪ ﯾﮏ ﻣﺘﻐﯿﺮ ﺳﺮاﺳﺮي ﺑﺎ آن ﻧﺎم اﯾﺠﺎد ﮐﺮده و‬
‫ﻣﻘﺪاري را ﺑﻪ آن اﺧﺘﺼﺎص ﻣﯽ دﻫﺪ.‬
‫ﺑﺎ اﯾﻦ وﺟﻮد ﭘﯿﺸﻨﻬﺎد ﻣﯽ ﺷﻮد ﻫﻤﯿﺸﻪ ﻗﺒﻞ از ﺑﻪ ﮐﺎرﮔﯿﺮي ﻣﺘﻐﯿﺮﻫﺎ آن ﻫﺎ را اﻋﻼن ﮐﻨﯿﺪ.‬

‫ﮐﻠﻤﺎت ﮐﻠﯿﺪي :‬
‫ﺟﺎوااﺳﮑﺮﯾﭙﺖ ﺗﻌﺪادي از ﮐﻠﻤﺎت را ﺑﻪ ﻋﻨﻮان ﮐﻠﻤﺎت ﮐﻠﯿﺪي )‪ (keywords‬ﻣﯽ ﺷﻨﺎﺳﺪ . اﯾﻦ ﮐﻠﻤﺎت ﮐﻠﯿﺪي ﻣﻌﻤﻮﻻ اﺑﺘﺪا ﯾﺎ اﻧﺘﻬﺎي دﺳﺘﻮرات‬
‫را ﻣﺸﺨﺺ ﻣﯽ ﮐﻨﻨﺪ . ﮐﻠﻤﺎت ﮐﻠﯿﺪي ﺑﻪ ﻋﻨﻮان ﮐﻠﻤﺎت رزرو ﺷﺪه ﺷﻨﺎﺧﺘﻪ ﻣﯽ ﺷﻮﻧﺪ و ﻧﻤﯽ ﺗﻮان از آن ﻫﺎ ﺑﻪ ﻋﻨﻮان ﻧﺎم ﻣﺘﻐﯿﺮ ﻫﺎ ﯾﺎ ﺗﻮاﺑﻊ‬
‫اﺳﺘﻔﺎده ﻧﻤﻮد . در زﯾﺮ ﻟﯿﺴﺖ ﮐﺎﻣﻠﯽ از اﯾﻦ ﮐﻠﻤﺎت را ﻣﺸﺎﻫﺪه ﻣﯽ ﮐﻨﯿﺪ :‬
‫‪var‬‬
‫‪void‬‬
‫‪while‬‬
‫‪with‬‬

‫۴‬

‫‪www.IrPDF.com‬‬

‫‪new‬‬
‫‪return‬‬
‫‪switch‬‬
‫‪this‬‬
‫‪throw‬‬
‫‪try‬‬
‫‪typeof‬‬

‫‪else‬‬
‫‪finally‬‬
‫‪for‬‬
‫‪function‬‬
‫‪if‬‬
‫‪in‬‬
‫‪instanceof‬‬

‫‪Break‬‬
‫‪Case‬‬
‫‪Catch‬‬
‫‪Continue‬‬
‫‪Default‬‬
‫‪Delete‬‬
‫‪Do‬‬

‫‪www.IrPDF.com‬‬
‫ﻧﻮﯾﺴﻨﺪه : اﺣﻤﺪ ﺑﺎدﭘﯽ‬

‫آﻣﻮزش ﮐﺎرﺑﺮدي ﺟﺎوااﺳﮑﺮﯾﭙﺖ‬

‫اﮔﺮ ﺷﻤﺎ از ﯾﮑﯽ از ﮐﻠﻤﺎت ﻓﻮق ﺑﺮاي ﻧﺎﻣﮕﺬاري ﻣﺘﻐﯿﺮ ﻫﺎ ﯾﺎ ﺗﻮاﺑﻊ اﺳﺘﻔﺎده ﮐﻨﯿﺪ ﺑﺎ ﺧﻄﺎي ‪ Identifier expected‬روﺑﺮو ﺧﻮاﻫﯿﺪ ﺷﺪ .‬
‫ﮐﻠﻤﺎت رزرو ﺷﺪه :‬
‫ﺟﺎوااﺳﮑﺮﯾﭙﺖ ﺗﻌﺪادي از ﮐﻠﻤﺎت رزرو ﺷﺪه را ﻧﯿﺰ ﻣﻌﺮﻓﯽ ﮐﺮده اﺳﺖ . ﮐﻠﻤﺎت رزرو ﺷﺪه ﻧﯿﺰ ﻧﻤﯽ ﺗﻮاﻧﻨﺪ ﺑﻪ ﻋﻨﻮان ﻧﺎم ﻣﺘﻐﯿﺮ ﻫﺎ و ﺗﻮاﺑﻊ اﺳﺘﻔﺎده‬
‫ﺷﻮﻧﺪ . ﻟﯿﺴﺖ ﮐﺎﻣﻠﯽ از اﯾﻦ ﮐﻠﻤﺎت را در زﯾﺮ ﻣﺸﺎﻫﺪه ﻣﯽ ﮐﻨﯿﺪ :‬
‫‪short‬‬
‫‪static‬‬
‫‪super‬‬
‫‪synchronized‬‬
‫‪throws‬‬
‫‪transient‬‬
‫‪volatile‬‬

‫‪int‬‬
‫‪interface‬‬
‫‪long‬‬
‫‪native‬‬
‫‪package‬‬
‫‪private‬‬
‫‪protected‬‬
‫‪public‬‬

‫‪enum‬‬
‫‪export‬‬
‫‪extends‬‬
‫‪final‬‬
‫‪float‬‬
‫‪goto‬‬
‫‪implements‬‬
‫‪import‬‬

‫‪Abstract‬‬
‫‪Boolean‬‬
‫‪Byte‬‬
‫‪Char‬‬
‫‪Class‬‬
‫‪Const‬‬
‫‪Debugger‬‬
‫‪Double‬‬

‫ﻣﻘﺎدﯾﺮ اﺻﻠﯽ :‬
‫در ﺟﺎوا اﺳﮑﺮﯾﭙﺖ ﭘﻨﺞ ﻧﻮع ﻣﻘﺪار اﺻﻠﯽ ﺑﻪ ﺷﺮح زﯾﺮ وﺟﻮد دارد :‬
‫‪undefined , null , boolean , number , string‬‬
‫ﻋﻤﻠﮕﺮ ‪ typeof‬ﯾﮏ ﭘﺎراﻣﺘﺮ ﻣﯽ ﮔﯿﺮد : ﯾﺎ ﯾﮏ ﻣﺘﻐﯿﺮ ﯾﺎ ﯾﮏ ﻣﻘﺪار و ﻧﻮع آن را ﺑﺮ ﻣﯽ ﮔﺮداﻧﺪ.‬
‫اﯾﻦ ﻋﻤﻠﮕﺮ ﯾﮑﯽ از ﭘﻨﺞ ﻧﻮع زﯾﺮ را ﺑﺮ ﻣﯽ ﮔﺮداﻧﺪ.‬
‫‪ : UndeFined‬اﮔﺮ ﻧﻮع ﻣﺘﻐﯿﺮ از ﻧﻮع ‪ undefined‬اﺳﺖ.‬
‫‪‬‬
‫‪ : Boolean‬اﮔﺮ ﻧﻮع ﻣﺘﻐﯿﺮ از ﻧﻮع ‪ Boolean‬ﺑﺎﺷﺪ.‬
‫‪‬‬
‫‪ : Number‬اﮔﺮ ﻧﻮع ﻣﺘﻐﯿﺮ از ﻧﻮع ‪ Number‬ﺑﺎﺷﺪ.‬
‫‪‬‬
‫‪ : String‬اﮔﺮ ﻧﻮع ﻣﺘﻐﯿﺮ از ‪ String‬ﺑﺎﺷﺪ.‬
‫‪‬‬
‫‪ : Object‬اﮔﺮ ﻣﺘﻐﯿﺮ ﯾﮏ ارﺟﺎع ﯾﺎ از ﻧﻮع ‪ null‬ﺑﺎﺷﺪ .‬
‫‪‬‬
‫ﻧﻮع داده ‪: Undefind‬‬
‫اﯾﻦ ﻧﻮع ﻓﻘﻂ ﺷﺎﻣﻞ ﯾﮏ ﻣﻘﺪار ﻣﯽ ﺷﻮد : ‪. Undefined‬‬
‫ﻣﺘﻐﯿﺮي ﮐﻪ اﻋﻼن ﻣﯽ ﺷﻮد وﻟﯽ ﻣﻘﺪار دﻫﯽ اوﻟﯿﻪ ﻧﻤﯽ ﺷﻮد ﺑﻪ ﺻﻮرت ﭘﯿﺶ ﻓﺮض از ﻧﻮع ‪ Undefined‬ﺧﻮاﻫﺪ ﺑﻮد .‬
‫"‪// outputs "Undefined‬‬

‫; )‪oTemp‬‬

‫; ‪Var oTemp‬‬
‫‪alert (typeof‬‬

‫ﻧﮑﺘﻪ اﯾﻨﮑﻪ ﮐﻪ ﻣﺘﻐﯿﺮي ﮐﻪ اﻋﻼن ﻣﯽ ﺷﻮد و ﻣﻘﺪار ﻧﻤﯽ ﮔﯿﺮد ﺑﺎ ﻣﺘﻐﯿﺮي ﮐﻪ اﺻﻶ اﻋﻼن ﻫﻢ ﻧﺸﺪه اﺳﺖ ﮐﺎﻣﻼ ﻣﺘﻔﺎوت اﺳﺖ . ﻫﺮ ﭼﻨﺪ ﮐﻪ‬
‫ﻋﻤﻠﮕﺮ ‪ typeof‬ﺑﯿﻦ اﯾﻦ دو ﺗﻔﺎوﺗﯽ ﻗﺎﺋﻞ ﻧﻤﯽ ﺷﻮد. و ﺑﺮاي ﻫﺮ دو ﻣﺘﻐﯿﺮ ﻣﻘﺪار ‪ Undefined‬را ﺑﺮ ﻣﯽ ﮔﺮداﻧﺪ , اﮔﺮ ﭼﻪ ﻓﻘﻂ ﯾﮑﯽ از آن‬
‫ﻫﺎ )2‪ (oTemp‬ﺗﻌﺮﯾﻒ ﺷﺪه اﺳﺖ.‬
‫"‪// outputs "Undefined‬‬
‫"‪// outputs "Undefined‬‬

‫; ‪Var oTemp‬‬
‫; )‪alert (typeof oTemp‬‬
‫; )2‪alert (typeof oTemp‬‬

‫اﮔﺮ ﺷﻤﺎ از 2‪ oTemp‬ﺑﻪ وﺳﯿﻠﻪ ي ﻫﺮ ﻋﻤﻠﮕﺮي ﺑﻪ ﻏﯿﺮ از ‪ typeof‬اﺳﺘﻔﺎده ﮐﻨﯿﺪ ﯾﮏ ﺧﻄﺎ رخ ﺧﻮاﻫﺪ داد :‬
‫‪//make sure this variable isn’t defined‬‬
‫;2‪//var oTemp‬‬
‫‪//try outputting‬‬
‫‪alert(oTemp2 == undefined); //causes error‬‬

‫۵‬

‫‪www.IrPDF.com‬‬

‫‪www.IrPDF.com‬‬
‫ﻧﻮﯾﺴﻨﺪه : اﺣﻤﺪ ﺑﺎدﭘﯽ‬

‫آﻣﻮزش ﮐﺎرﺑﺮدي ﺟﺎوااﺳﮑﺮﯾﭙﺖ‬

‫ﻣﻘﺪار ‪ Undefined‬زﻣﺎﻧﯽ ﮐﻪ ﯾﮏ ﺗﺎﺑﻊ ﻣﻘﺪاري را ﺑﺮﻧﮕﺮداﻧﺪ ﻫﻢ ‪ Return‬ﻣﯽ ﺷﻮد.‬
‫{ )( ‪Function Testfunc‬‬
‫‪// leave the function black‬‬
‫}‬
‫”‪alert( TestFunc() == undefined ); //outputs “true‬‬

‫ﻧﻮع داده ‪: Null‬‬
‫دﯾﮕﺮ ﻧﻮع داده ﮐﻪ ﻓﻘﻂ ﯾﮏ ﻣﻘﺪار دارد , ‪ null‬اﺳﺖ ﮐﻪ ﻣﻘﺪار وﯾﮋه ‪ null‬را ﻣﯽ ﮔﯿﺮد.‬
‫از ﻧﻈﺮ ‪ Java Script‬ﻧﻮع ‪ Undefined‬ﯾﮑﯽ از ﻣﺸﺘﻘﺎت ﻧﻮع ‪ null‬اﺳﺖ و ﻣﻌﺎدل ﯾﮑﺪﯾﮕﺮﻧﺪ :‬
‫”‪alert(null == undefined); //outputs “true‬‬

‫اﮔﺮ ﭼﻪ اﯾﻦ دو ﻣﻌﺎدل ﯾﮑﺪﯾﮕﺮﻧﺪ اﻣﺎ ﻣﻌﺎﻧﯽ ﺧﺎﺻﯽ دارﻧﺪ.‬
‫‪ Undefined‬ﻣﻮﻗﻌﯽ ﺑﻪ ﯾﮏ ﻣﺘﻐﯿﺮ ﻧﺴﺒﺖ داده ﻣﯽ ﺷﻮد ﮐﻪ اﻋﻼن ﺷﻮد وﻟﯽ ﻣﻘﺪاردﻫﯽ ﻧﺸﻮد. در ﺣﺎﻟﯽ ﮐﻪ ﻣﺘﻐﯿﺮي وﻗﺘﯽ از ﻧﻮع ‪null‬‬
‫اﺳﺖ ﮐﻪ ﺷﺎﻣﻞ ﺷﯽء اي ﺑﺎﺷﺪ ﮐﻪ وﺟﻮد ﻧﺪارد.‬
‫ﻧﻮع داده ‪: Boolean‬‬
‫ﻧﻮع ‪ Boolean‬ﯾﮑﯽ از ﭘﺮ اﺳﺘﻔﺎده ﺗﺮﯾﻦ ﻧﻮع داده در زﺑﺎن ﻫﺎي ﺑﺮﻧﺎﻣﻪ ﻧﻮﯾﺴﯽ اﺳﺖ و ﻣﺘﻐﯿﺮي از اﯾﻦ ﻧﻮع ﻓﻘﻂ ﻣﯽ ﺗﻮاﻧﺪ ﯾﮑﯽ از دو ﻣﻘﺪار‬
‫‪ true‬ﯾﺎ ‪ false‬ﺑﻪ ﻋﻨﻮان ﻣﻘﺪار ﺑﭙﺬﯾﺮد . اﮔﺮ ﭼﻪ ﺑﺮ ﺧﻼف زﺑﺎن ﻫﺎي ﺑﺮﻧﺎﻣﻪ ﻧﻮﯾﺴﯽ ﻣﺘﺪاول , در ﺟﺎوا اﺳﮑﺮﯾﭙﺖ ‪ false‬ﺑﺎ 0 ﺑﺮاﺑﺮ ﻧﯿﺴﺖ اﻣﺎ‬
‫در ﺻﻮرت ﻟﺰوم 0 ﺑﻪ ‪ false‬ﺗﺒﺪﯾﻞ ﺧﻮاﻫﺪ ﺷﺪ . ﺑﻪ ﻣﺜﺎل ﻫﺎي زﯾﺮ ﺗﻮﺟﻪ ﮐﻨﯿﺪ :‬
‫;‪var bFound = true‬‬
‫;‪var bLost = false‬‬

‫ﻧﻮع داده ‪: Number‬‬
‫اﯾﻦ ﻧﻮع ﻧﯿﺰ ﯾﮑﯽ از ﭘﺮﮐﺎرﺑﺮدﺗﺮﯾﻦ اﻧﻮاع اﺳﺖ. اﯾﻦ ﻧﻮع داده ﻣﯽ ﺗﻮاﻧﺪ ﺷﺎﻣﻞ اﻋﺪاد ‪ 8 , Integer‬ﺑﺎﯾﺘﯽ و اﻋﺪاد اﻋﺸﺎري 61 ﺑﺎﯾﺘﯽ ﺑﺎﺷﺪ.‬
‫ﺑﻪ ﻋﻨﻮان ﻣﺜﺎل ﻣﺘﻐﯿﺮ زﯾﺮ از ﻧﻮع ‪ Integer‬اﺳﺖ و ﻣﻘﺪار اوﻟﯿﻪ ي 55 را دارد :‬
‫;55 = ‪var iNum‬‬

‫ﺑﺮاي ﺗﻌﺮﯾﻒ ﻣﺘﻐﯿﺮﻫﺎي اﻋﺸﺎري ﺑﻪ ﺻﻮرت زﯾﺮ ﻋﻤﻞ ﻣﯽ ﺷﻮد :‬
‫;0.5 = ‪var fNum‬‬

‫ﻧﻮع داده ‪: String‬‬
‫اﯾﻦ ﻧﻮع ﻣﯽ ﺗﻮاﻧﺪ ﺑﺮاي ذﺧﯿﺮه ﺻﻔﺮ ﯾﺎ ﭼﻨﺪﯾﻦ ﮐﺎراﮐﺘﺮ ﺑﻪ ﮐﺎر رود. ﻫﺮ ﮐﺎراﮐﺘﺮ در ﯾﮏ رﺷﺘﻪ ﻣﻮﻗﻌﯿﺘﯽ دارد. ﻣﻮﻗﻌﯿﺖ اوﻟﯿﻦ ﮐﺎراﮐﺘﺮ ﺻﻔﺮ اﺳﺖ.‬
‫ﺑﺮاي ﺗﻌﺮﯾﻒ ﯾﮏ ﻣﺘﻐﯿﺮ ‪ String‬ﺑﺎﯾﺪ از ) ' ( ﯾﺎ ) " ( اﺳﺘﻔﺎده ﮐﻨﯿﻢ . ﻣﻌﻤﻮﻵ ﺑﺮاي ﺗﻌﺮﯾﻒ ﯾﮏ ﮐﺎراﮐﺘﺮ از ) ' ( و ﺑﺮاي ﺗﻌﺮﯾﻒ ﯾﮏ رﺷﺘﻪ از )‬
‫" ( اﺳﺘﻔﺎده ﻣﯽ ﺷﻮد.‬
‫;"‪var sColor1 = "blue‬‬
‫;'‪var sColor2 = 'blue‬‬

‫۶‬

‫‪www.IrPDF.com‬‬

‫‪www.IrPDF.com‬‬
‫ﻧﻮﯾﺴﻨﺪه : اﺣﻤﺪ ﺑﺎدﭘﯽ‬

‫آﻣﻮزش ﮐﺎرﺑﺮدي ﺟﺎوااﺳﮑﺮﯾﭙﺖ‬

‫ﺗﺒﺪﯾﻞ اﻧﻮاع :‬
‫ﺟﺎوا اﺳﮑﺮﯾﭙﺖ ﺗﻮاﺑﻌﯽ را ﺑﺮاي ﺗﺒﺪﯾﻞ اﻧﻮاع ﻓﺮاﻫﻢ آورده اﺳﺖ.‬
‫ﺗﺒﺪﯾﻞ ﺑﻪ رﺷﺘﻪ :‬
‫ﯾﮑﯽ از ﺟﺬاﺑﺘﺮﯾﻦ وﯾﮋﮔﯽ ﻫﺎﯾﯽ ﮐﻪ ﺟﺎوا اﺳﮑﺮﯾﭙﺖ در راﺑﻄﻪ ﺑﺎ اﻧﻮاع اﺻﻠﯽ ‪ Numbers , Boolean‬و ‪ String‬ﻓﺮاﻫﻢ ﮐﺮده اﺳﺖ اﯾﻦ‬
‫اﺳﺖ ﮐﻪ آﻧﻬﺎ در اﺻﻞ اﺷﯿﺎي ﮐﺎذب ﻫﺴﺘﻨﺪ, ﺑﻪ اﯾﻦ ﻣﻌﻨﯽ ﮐﻪ داراي ﺧﺎﺻﯿﺖ ﻫﺎ و ﻣﺘﺪﻫﺎي ﻣﺸﺘﺮك و ﻣﻨﺤﺼﺮ ﺑﻪ ﻓﺮدي ﻣﯽ ﺑﺎﺷﻨﺪ.‬
‫ﺑﻪ ﻋﻨﻮان ﻣﺜﺎل ﺑﺮاي ﺑﺪﺳﺖ آوردن ﻃﻮل ﯾﮏ رﺷﺘﻪ ﻣﯽ ﺗﻮان از ﺧﺎﺻﯿﺖ ‪ Length‬اﺳﺘﻔﺎده ﻧﻤﻮد :‬
‫”4“ ‪//outputs‬‬

‫; "‪var sColor = "blue‬‬
‫; )‪alert (sColor.length‬‬

‫ﺳﻪ ﻧﻮع داده ‪ Number , Bool‬و ‪ String‬ﻣﺘﺪي ﺑﻪ ﻧﺎم )(‪ tostring‬ﺑﺮاي ﺗﺒﺪﯾﻞ ﺑﻪ رﺷﺘﻪ دارﻧﺪ.‬
‫اﯾﻦ ﻣﺘﺪ ﺑﺮاي ﻣﺘﻐﯿﺮ ﻫﺎي از ﻧﻮع ‪ Boolean‬ﯾﮑﯽ از ﻣﻘﺎدﯾﺮ ‪ true‬و ‪ false‬را ﺑﺴﺘﻪ ﺑﻪ ﻣﻘﺪار ﻣﺘﻐﯿﺮ ﺑﺮ ﻣﯽ ﮔﺮداﻧﺪ :‬
‫;‪var bFound = false‬‬
‫”‪alert(bFound.toString()); //outputs “false‬‬

‫اﯾﻦ ﻣﺘﺪ ﺑﺮاي ﻣﺘﻐﯿﺮ ﻫﺎي از ﻧﻮع ‪ number‬رﺷﺘﻪ اي ﺣﺎوي آن ﻋﺪد را ﺑﺮ ﻣﯽ ﮔﺮداﻧﺪ :‬
‫;01 = 1‪var iNum‬‬
‫;0.01 = 2‪var fNum‬‬
‫”01“ ‪alert(iNum1.toString()); //outputs‬‬
‫”01“ ‪alert(fNum2.toString()); //outputs‬‬

‫ﺗﺒﺪﯾﻞ ﺑﻪ ﯾﮏ ﻋﺪد :‬
‫ﺟﺎوا اﺳﮑﺮﯾﭙﺖ دو ﻣﺘﺪ ﺑﺮاي ﺗﺒﺪﯾﻞ اﻧﻮاع ﻏﯿﺮ ﻋﺪدي ﺑﻪ ﻋﺪدي ﻓﺮاﻫﻢ ﮐﺮده اﺳﺖ :‬
‫)(‪ praseInt‬‬
‫)(‪ parseFloat‬‬
‫‪ ‬ﻧﮑﺘﻪ : ﺗﻮﺟﻪ ﮐﻨﯿﺪ ﮐﻪ ﺣﺮوف ‪ I‬و ‪ F‬ﺑﺎﯾﺪ ﺑﻪ ﺻﻮرت ﺣﺮف ﺑﺰرگ ﻧﻮﺷﺘﻪ ﺷﻮﻧﺪ .‬
‫اﯾﻦ ﻣﺘﺪ ﻫﺎ ﻓﻘﻂ ﺑﺮ روي رﺷﺘﻪ ﻫﺎي ﺣﺎوي ﻋﺪد ﮐﺎر ﻣﯽ ﮐﻨﻨﺪ و ﺑﺮ روي ﺑﻘﯿﻪ اﻧﻮاع ﻣﻘﺪار ‪ NaN‬را ﺑﺮ ﻣﯽ ﮔﺮداﻧﻨﺪ.‬
‫ﻣﺘﺪ )(‪ parseInt‬از اوﻟﯿﻦ ﮐﺎراﮐﺘﺮ رﺷﺘﻪ ﺷﺮوع ﻣﯽ ﮐﻨﺪ اﮔﺮ ﻋﺪد ﺑﻮد آن را ﺑﺮ ﻣﯽ ﮔﺮداﻧﺪ در ﻏﯿﺮ اﯾﻦ ﺻﻮرت ﻣﻘﺪار ‪ NaN‬را ﺑﺮﻣﯽ ﮔﺮداﻧﺪ.‬
‫اﯾﻦ روﻧﺪ ﺗﺎ آﺧﺮﯾﻦ ﮐﺎراﮐﺘﺮ اداﻣﻪ ﭘﯿﺪا ﻣﯽ ﮐﻨﺪ ﺗﺎ اﯾﻨﮑﻪ ﺑﻪ ﮐﺎراﮐﺘﺮي ﻏﯿﺮ ﻋﺪدي ﺑﺮﺳﺪ. ﺑﻪ ﻋﻨﻮان ﻣﺜﺎل اﯾﻦ ﻣﺘﺪ ﻋﺒﺎرت "‪ "123red‬را ﺑﻪ‬
‫ﺻﻮرت 321 ﺑﺮ ﻣﯽ ﮔﺮداﻧﺪ.‬
‫4321 ‪var iNum1 = parseInt(“1234blue”); //returns‬‬
‫;)"5.22"(‪var iNum3 = parseInt‬‬
‫22 ‪//returns‬‬
‫;)"‪var iNum4 = parseInt("blue‬‬
‫‪//returns NaN‬‬

‫ﻣﺘﺪ )(‪ parseFloat‬ﻧﯿﺰ ﻣﺜﻞ )(‪ parseInt‬ﮐﺎر ﻣﯽ ﮐﻨﺪ و از اوﻟﯿﻦ ﮐﺎراﮐﺘﺮ ﺷﺮوع ﺑﻪ ﺟﺴﺘﺠﻮ ﻣﯽ ﮐﻨﺪ. اﻟﺒﺘﻪ در اﯾﻦ ﻣﺘﺪ اوﻟﯿﻦ ﮐﺎراﮐﺘﺮ‬
‫ﻧﻘﻄﻪ ﺣﺴﺎب ﻧﻤﯽ ﺷﻮد و آن را ﺑﻪ ﻫﻤﺎن ﺻﻮرت ﺑﺮ ﻣﯽ ﮔﺮداﻧﺪ.‬
‫٧‬

‫‪www.IrPDF.com‬‬

‫‪www.IrPDF.com‬‬
‫ﻧﻮﯾﺴﻨﺪه : اﺣﻤﺪ ﺑﺎدﭘﯽ‬

‫آﻣﻮزش ﮐﺎرﺑﺮدي ﺟﺎوااﺳﮑﺮﯾﭙﺖ‬

‫اﮔﺮ دو ﮐﺎراﮐﺘﺮ ﻧﻘﻄﻪ در رﺷﺘﻪ وﺟﻮد داﺷﺘﻪ ﺑﺎﺷﻨﺪ دوﻣﯿﻦ ﻧﻘﻄﻪ ﺑﻪ ﻋﻨﻮان ‪ invalid‬ﺷﻨﺎﺧﺘﻪ ﻣﯽ ﺷﻮد و ﻋﻤﻠﯿﺎت ﺗﺒﺪﯾﻞ ﻣﺘﻮﻗﻒ ﻣﯽ ﺷﻮد. ﻣﺜﺎل‬
‫ﻫﺎ :‬
‫0.4321‬
‫5.22‬
‫43.22‬
‫‪NaN‬‬

‫‪//returns‬‬
‫‪//returns‬‬
‫‪//returns‬‬
‫‪//returns‬‬

‫;)”‪parseFloat(“1234blue‬‬
‫;)”5.22“(‪parseFloat‬‬
‫;)”5.43.22“(‪parseFloat‬‬
‫;)”‪parseFloat(“blue‬‬

‫=‬
‫=‬
‫=‬
‫=‬

‫1‪fNum‬‬
‫3‪fNum‬‬
‫4‪fNum‬‬
‫6‪fNum‬‬

‫‪var‬‬
‫‪var‬‬
‫‪var‬‬
‫‪var‬‬

‫روش دﯾﮕﺮ ﺗﺒﺪﯾﻞ اﻧﻮاع )‪(Type Casting‬‬
‫ﺳﻪ ﻧﻮع ‪ type casting‬در ﺟﺎوا اﺳﮑﺮﯾﭙﺖ وﺟﻮد دارد :‬
‫)( ‪ Boolean‬‬
‫)( ‪ Number‬‬
‫)( ‪ String‬‬
‫ﺗﺎﺑﻊ )(‪ Boolean‬ﻣﻘﺪار ‪ True‬را وﻗﺘﯽ ﺑﺮ ﻣﯽ ﮔﺮداﻧﺪ ﮐﻪ رﺷﺘﻪ ﺷﺎﻣﻞ ﺣﺪاﻗﻞ ﯾﮏ ﮐﺎرﮐﺘﺮ , ﯾﮏ ﻋﺪد ﺑﺰرﮔﺘﺮ از ﺻﻔﺮ و ﯾﺎ ﯾﮏ ﺷﯽء ﺑﺎﺷﺪ‬
‫و ﻣﻘﺪار ‪ False‬را ﺑﺮ ﻣﯽ ﮔﺮداﻧﺪ ﻫﺮ ﮔﺎه رﺷﺘﻪ ﺧﺎﻟﯽ اﺳﺖ ﯾﺎ ﺻﻔﺮ اﺳﺖ ﯾﺎ ‪ undefined‬و ﯾﺎ ‪ null‬ﺑﺎﺷﺪ :‬
‫;)”“(‪Boolean‬‬
‫;)”‪Boolean(“hi‬‬
‫;)001(‪Boolean‬‬
‫;)‪Boolean(null‬‬
‫;)0(‪Boolean‬‬
‫;))(‪Boolean(new Object‬‬

‫‪//false – empty string‬‬
‫‪//true – non-empty string‬‬
‫‪//true – non-zero number‬‬
‫‪//false - null‬‬
‫‪//false - zero‬‬
‫‪//true – object‬‬

‫=‬
‫=‬
‫=‬
‫=‬
‫=‬
‫=‬

‫1‪b‬‬
‫2‪b‬‬
‫3‪b‬‬
‫4‪b‬‬
‫5‪b‬‬
‫6‪b‬‬

‫‪var‬‬
‫‪var‬‬
‫‪var‬‬
‫‪var‬‬
‫‪var‬‬
‫‪var‬‬

‫ﺗﺎﺑﻊ )(‪ Number‬ﮐﺎري ﺷﺒﯿﻪ )(‪ ParseInt‬و )(‪ ParseFloat‬را اﻧﺠﺎم ﻣﯽ دﻫﺪ اﻣﺎ ﺗﻔﺎوت ﻫﺎﯾﯽ ﻫﻢ دارد .‬
‫اﮔﺮ ﺑﻪ ﯾﺎد داﺷﺘﻪ ﺑﺎﺷﯿﺪ ﻣﺘﺪ ﻫﺎي )(‪ ParseInt‬و )(‪ParseFloat‬ﻣﻘﺪار ﮔﺮﻓﺘﻪ ﺷﺪه را ﻓﻘﻂ ﺗﺎ اوﻟﯿﻦ ﮐﺎراﮐﺘﺮ ﺑﯽ ارزش ﺑﺮ ﻣﯽ ﮔﺮداﻧﺪﻧﺪ.‬
‫ﻣﺜﻼ رﺷﺘﻪ ”6.5.4“ ﺑﻪ 5.4 ﺗﺒﺪﯾﻞ ﺧﻮاﻫﻨﺪ ﮐﺮد . اﻣﺎ ﮐﺎرﺑﺮد ﻣﺘﺪ )(‪ Number‬ﺑﺮاي اﯾﻦ رﺷﺘﻪ ﻣﻘﺪار ‪ NaN‬را ﺑﺮ ﻣﯽ ﮔﺮداﻧﺪ زﯾﺮا اﯾﻦ‬
‫رﺷﺘﻪ از ﻧﻈﺮ ﻣﺘﺪ )(‪ Number‬در ﮐﻞ اﻣﮑﺎن ﺗﺒﺪﯾﻞ ﺑﻪ ﯾﮏ ﻋﺪد را ﻧﺪارد .‬
‫اﮔﺮ رﺷﺘﻪ اي اﻣﮑﺎن ﺗﺒﺪﯾﻞ ﺑﻪ ﯾﮏ ﻋﺪد را داﺷﺘﻪ ﺑﺎﺷﺪ ﻣﺘﺪ )(‪ Number‬ﺑﺮاي اﯾﻨﮑﻪ از )(‪ ParseInt‬ﯾﺎ )(‪ ParseFloat‬اﺳﺘﻔﺎده ﮐﻨﺪ‬
‫ﺗﺼﻤﯿﻢ ﻣﯽ ﮔﯿﺮد . در ﻣﺜﺎل زﯾﺮ ﺣﺎﺻﻞ اﺟﺮاي ﻣﺘﺪ )(‪ Number‬ﺑﺮاي اﻧﻮاع داده ﻫﺎ را ﻧﺸﺎن ﻣﯽ دﻫﺪ :‬
‫0‬
‫1‬
‫‪NaN‬‬
‫0‬
‫5.5‬
‫65‬
‫‪NaN‬‬
‫‪NaN‬‬
‫001‬

‫)‪Number(false‬‬
‫)‪Number(true‬‬
‫)‪Number(undefined‬‬
‫)‪Number(null‬‬
‫)”5.5“(‪Number‬‬
‫)”65“(‪Number‬‬
‫)”7.6.5“(‪Number‬‬
‫))(‪Number(new Object‬‬
‫)001(‪Number‬‬

‫ﺳﺎده ﺗﺮﯾﻦ ﺗﺎﺑﻊ ﻫﻢ )(‪ String‬اﺳﺖ ﮐﻪ ﻫﻤﺎن ﭼﯿﺰي را ﮐﻪ ﻣﯽ ﮔﯿﺮد ﺑﻪ ﻋﻨﻮان رﺷﺘﻪ ﺑﺮ ﻣﯽ ﮔﺮداﻧﺪ :‬
‫”‪”null‬‬
‫٨‬

‫‪www.IrPDF.com‬‬

‫// ;)‪var s1 = String(null‬‬

‫‪www.IrPDF.com‬‬
‫ﻧﻮﯾﺴﻨﺪه : اﺣﻤﺪ ﺑﺎدﭘﯽ‬

‫آﻣﻮزش ﮐﺎرﺑﺮدي ﺟﺎوااﺳﮑﺮﯾﭙﺖ‬

‫ﺟﺎوااﺳﮑﺮﯾﭙﺖ در ﻣﺮورﮔﺮ ﻫﺎ :‬
‫ﺣﺎل ﮐﻪ ﺗﺎ ﺣﺪودي ﺑﺎ ﺑﺴﯿﺎري از ﻣﻔﺎﻫﯿﻢ ﭘﺎﯾﻪ ﺟﺎوااﺳﮑﺮﯾﭙﺖ آﺷﻨﺎ ﺷﺪﯾﻢ ﻣﯽ ﺧﻮاﻫﯿﻢ ﻃﺮﯾﻘﻪ اﺳﺘﻔﺎده و ﻗﺮار دادن آن ﻫﺎ در ﺻﻔﺤﻪ را ﺑﺮرﺳﯽ‬
‫ﮐﻨﯿﻢ . ‪ HTML‬ﺑﺮاي اﺳﺘﻔﺎده از ﺟﺎوااﺳﮑﺮﯾﭙﺖ در ﺻﻔﺤﺎت ﺗﮕﯽ ﺑﻪ ﻧﺎم ‪ script‬را ﻓﺮاﻫﻢ ﮐﺮده ﮐﻪ در اداﻣﻪ ﺑﺎ آن آﺷﻨﺎ ﺧﻮاﻫﯿﻢ ﺷﺪ .‬
‫ﻋﻤﻮﻣﺎ از اﯾﻦ ﺗﮓ در داﺧﻞ ﺗﮓ ‪ head‬ﺻﻔﺤﻪ اﺳﺘﻔﺎده ﻣﯽ ﺷﻮد و ﻣﯽ ﺗﻮاﻧﺪ ﯾﮏ ، دو ﯾﺎ ﺳﻪ ﺻﻔﺖ را ﺑﮕﯿﺮد . ﺻﻔﺖ ‪ language‬ﮐﻪ ﻧﻮع‬
‫زﺑﺎن اﺳﺘﻔﺎده ﺷﺪه را ﺗﻌﯿﯿﻦ ﻣﯽ ﮐﻨﺪ ، ﺻﻔﺖ اﺧﺘﯿﺎري ‪ src‬ﮐﻪ ﻣﮑﺎن ﯾﮏ ﻓﺎﯾﻞ ﺧﺎرﺟﯽ ﺟﺎوااﺳﮑﺮﯾﭙﺖ را ﻣﺸﺨﺺ ﻣﯽ ﮐﻨﺪ و ﺻﻔﺖ ‪ type‬ﮐﻪ‬
‫ﻧﻮع ‪ MIME TYPE‬ﯾﮏ ﻓﺎﯾﻞ ﺧﺎرﺟﯽ ﺟﺎوااﺳﮑﺮﯾﭙﺖ را ﻣﺸﺨﺺ ﻣﯽ ﮐﻨﺪ و ﺑﺎﯾﺪ ﺑﺮاﺑﺮ ﻋﺒﺎرت ‪ text/javascript‬ﻗﺮار داده ﺷﻮد .‬
‫ﻣﻘﺪار ﺻﻔﺖ ‪ language‬ﻣﻌﻤﻮﻻ ﺑﺮاﺑﺮ ‪ javascript‬ﯾﺎ ﯾﮑﯽ از ﻧﺴﺨﻪ ﻫﺎي آن ﻣﺜﻼ 3.1 ‪ javascript‬ﺗﻌﯿﯿﻦ ﻣﯽ ﺷﻮد . )اﮔﺮ از ﺻﻔﺖ‬
‫‪ javascript‬ﭼﺸﻢ ﭘﻮﺷﯽ ﺷﻮد ، ﻣﺮورﮔﺮ ﻫﺎ آﺧﺮﯾﻦ ﻧﺴﺨﻪ ﻣﻮﺟﻮد اﯾﻦ زﺑﺎن را در ﻧﻈﺮ ﻣﯽ ﮔﯿﺮﻧﺪ. (‬
‫ﮐﺪ ﻫﺎي ﺟﺎوااﺳﮑﺮﯾﭙﺖ در داﺧﻞ ﺗﮓ ‪ script‬ﻧﻮﺷﺘﻪ ﻣﯽ ﺷﻮﻧﺪ اﻣﺎ در ﺻﻮرﺗﯽ ﮐﻪ ﻫﻤﺰﻣﺎن از ﺻﻔﺖ ‪ src‬ﻧﯿﺰ اﺳﺘﻔﺎده ﺷﻮد در اﯾﻦ ﺻﻮرت‬
‫ﻣﻌﻤﻮﻻ ﻣﺮورﮔﺮ ﻫﺎ ﮐﺪ ﻫﺎي داﺧﻞ ﺗﮓ ‪ script‬را ﻧﺎدﯾﺪه ﻣﯽ ﮔﯿﺮﻧﺪ . ﺑﻪ ﻣﺜﺎل زﯾﺮ دﻓﺖ ﮐﻨﯿﺪ :‬
‫>‪‪‪Title of Page”‪‪‪‪‪-- ‪

Similar Documents

Premium Essay

Testing

...Certifications: A+ ACE Associate Project Manager CAPM Certification CBAP" - Certified Business Analysis Professional CCCI - Certified Computer Crime Investigator CCE - Certified Computer Examiner CCFT - Certified Computer Forensic Technician CCSA/CCSE Check Point CEECS - Certified Electronic Evidence Collection Specialist CEH - Certified Ethical Hacker CEIC - Computer and Enterprise Investigations Conference CFCE - Certified Forensic Computer Examiner CFE - Certified Fraud Examiner CFIA - Certified Forensic Investigation Analyst CHFI - Certified Hacking Forensic Investigator CIFI - Certified International Information Systems Forensic Investigator CISA - Certified Information Systems Auditor CISM - Certified Information Security Manager CISSP - Certified Information Systems Security Professional CISSP-ISSAP - Information Systems Security Architecture Professional CISSP-ISSEP - Information Systems Security Engineering Professional CISSP-ISSMP - Information Systems Security Management Professional CIW - Certified Internet Webmaster CNA - Certified Novell 5 Administrator CNE - Certified Netware Engineer CNSS 4013 Recognition CPE - Certified PGP Engineer - PGP Corporation CSA - Certified Security Analyst CSE - Certified Steganography Examiner CSFA - CyberSecurity Forensic Analyst CSICI - CyberSecurity Institute Certified Instructor CSIH - Certified Computer Security Incident Handler CSTA - Certified Security Testing Associate CSTP - Certified Security...

Words: 1957 - Pages: 8

Free Essay

Bahrain

...This is a good article. Click here for more information. Page protected with pending changes level 1 Bahrain From Wikipedia, the free encyclopedia Changes must be reviewed before being displayed on this page. Jump to: navigation, search For other uses, see Bahrain (disambiguation). Kingdom of Bahrain مملكة البحرين Mamlakat al-Baḥrayn Flag Coat of arms Anthem: نشيد البحرين الوطني Bahrainona Our Bahrain Sorry, your browser either has JavaScript disabled or does not have any supported player. You can download the clip or download a player to play the clip in your browser. Location of Bahrain (circled in red)in the Arabian Peninsula (light yellow) Location of Bahrain (circled in red) in the Arabian Peninsula (light yellow) Capital and largest city Manama 26°13′N 50°35′E Official languages Arabic Ethnic groups (2010[1]) 46% Bahraini 45.5% Asian 4.7% other Arabs 1.6% African 1% European 1.2% Other Religion Islam Demonym Bahraini Government Unitary parliamentary constitutional monarchy - King Hamad bin Isa Al Khalifa - Crown Prince Salman bin Hamad bin Isa Al Khalifa - Prime Minister Khalifa bin Salman Al Khalifa Legislature National Assembly - Upper house Consultative Council - Lower house Council of Representatives Independence - Declared Independence [2] 14 August 1971 - from UK [3] 15 August 1971 Area - Total...

Words: 17955 - Pages: 72

Premium Essay

Whats an Erp System ?

...mid size to large , we were able to assess and evaluate the ten best current erp systems and they are in none specific order : First, Openbravo Open bravo is a web-based, open source ERP business solution for small and medium sized companies. Already in production, Open bravo ERP encompasses a broad range of functionalities such as finance, supply chain, manufacturing & much more. Open bravo ERP has been designed with broad business functionality to help businesses improve overall performance. It is based on a single, integrated database model covering all key application areas of a complete business management system, including seamless integration to Business Intelligence (BI) and Point of Sale (POS). Open bravo is built on Java, JavaScript, SQL and PL/SQL, XML and XHTML. • Some of its best features : Highly configurable with an easy to use web application • Alerts - to alert the user whenever a certain condition -...

Words: 2549 - Pages: 11

Free Essay

Android 4

...Android 4.3, Jelly Bean Android 4.3, an even sweeter Jelly Bean, is available now on Nexus phones and tablets. Restricted profiles limit access to apps and content, at home with your family and at work. Bluetooth Smart support makes Android ready for a whole new class of mobile apps that connect to fitness sensors. Games look great thanks to the 3D realistic, high performance graphics powered by OpenGL ES 3.0. And there's a lot more new in this release: Audio * Virtual surround sound - enjoy movies from Google Play with surround sound on Nexus 7 (2013 edition) and other Nexus devices. Surround sound is powered by Fraunhofer Cingo™ mobile audio technology. Dial pad * Autocomplete - just start touching numbers or letters and the dial pad will suggest phone numbers or names. To turn on this feature, open your phone app settings and enable “Dial pad autocomplete.” Graphics * OpenGL ES 3.0 - Android now supports the latest version of the industry standard for high performance graphics. * Wireless Display for Nexus 7 (2013 edition) and Nexus 10 - project from your tablet to a TV. Internationalization and localization * Additional language support - Android is now translated in Africaans, Amharic (አማርኛ), Hindi (हिंदी), Swahili (Kiswahili), and Zulu (IsiZulu). * Hebrew, Arabic, and other RTL (right-to-left) - now supported in the home screen, settings, and Phone, People, and Keep apps. Keyboard & input * Easier text input - an improved...

Words: 4352 - Pages: 18

Free Essay

Xxxxxx

...HOW TO Prepare Your Curriculum Vitae Revised Edition Acy L. Jackson and C. Kathleen Geckeis Copyright © 2003 by The McGraw-Hill Companies, Inc. All rights reserved. Manufactured in the United States of America. Except as permitted under the United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the publisher. 0-07-142626-4 The material in this eBook also appears in the print version of this title: 0-07-139044-8 All trademarks are trademarks of their respective owners. Rather than put a trademark symbol after every occurrence of a trademarked name, we use names in an editorial fashion only, and to the benefit of the trademark owner, with no intention of infringement of the trademark. Where such designations appear in this book, they have been printed with initial caps. McGraw-Hill eBooks are available at special quantity discounts to use as premiums and sales promotions, or for use in corporate training programs. For more information, please contact George Hoare, Special Sales, at george_hoare@mcgraw-hill.com or (212) 904-4069. TERMS OF USE This is a copyrighted work and The McGraw-Hill Companies, Inc. (“McGraw-Hill”) and its licensors reserve all rights in and to the work. Use of this work is subject to these terms. Except as permitted under the Copyright Act of 1976 and the right to store and retrieve...

Words: 31831 - Pages: 128

Free Essay

Test2

...62118 0/nm 1/n1 2/nm 3/nm 4/nm 5/nm 6/nm 7/nm 8/nm 9/nm 1990s 0th/pt 1st/p 1th/tc 2nd/p 2th/tc 3rd/p 3th/tc 4th/pt 5th/pt 6th/pt 7th/pt 8th/pt 9th/pt 0s/pt a A AA AAA Aachen/M aardvark/SM Aaren/M Aarhus/M Aarika/M Aaron/M AB aback abacus/SM abaft Abagael/M Abagail/M abalone/SM abandoner/M abandon/LGDRS abandonment/SM abase/LGDSR abasement/S abaser/M abashed/UY abashment/MS abash/SDLG abate/DSRLG abated/U abatement/MS abater/M abattoir/SM Abba/M Abbe/M abbé/S abbess/SM Abbey/M abbey/MS Abbie/M Abbi/M Abbot/M abbot/MS Abbott/M abbr abbrev abbreviated/UA abbreviates/A abbreviate/XDSNG abbreviating/A abbreviation/M Abbye/M Abby/M ABC/M Abdel/M abdicate/NGDSX abdication/M abdomen/SM abdominal/YS abduct/DGS abduction/SM abductor/SM Abdul/M ab/DY abeam Abelard/M Abel/M Abelson/M Abe/M Aberdeen/M Abernathy/M aberrant/YS aberrational aberration/SM abet/S abetted abetting abettor/SM Abeu/M abeyance/MS abeyant Abey/M abhorred abhorrence/MS abhorrent/Y abhorrer/M abhorring abhor/S abidance/MS abide/JGSR abider/M abiding/Y Abidjan/M Abie/M Abigael/M Abigail/M Abigale/M Abilene/M ability/IMES abjection/MS abjectness/SM abject/SGPDY abjuration/SM abjuratory abjurer/M abjure/ZGSRD ablate/VGNSDX ablation/M ablative/SY ablaze abler/E ables/E ablest able/U abloom ablution/MS Ab/M ABM/S abnegate/NGSDX abnegation/M Abner/M abnormality/SM abnormal/SY aboard ...

Words: 113589 - Pages: 455